About

Hello and Welcome to CDR Tools Front End for Win32 help file!

This "Front end" is not designed to hide the command line interface from you! My major goal was to make CDR Tools easier to use without hiding the way it is done. In fact, it always shows command line before execute it. So if you learn the command line interface, you could use it on every platform (OS) supported by CDR Tools.

Please take time to read some topics in this help file!
Feel free to contact me at: http://demosten.com/ or stjordanov@hotmail.com for questions and bug reports, or just tell me, what do you think about it.

General notes:

  • Most dialogs remember their size, position and contents. This should speed up your work!
  • Pressing <F1> in various "Options ..." dialogs opens this help file with appropriate manual page.
  • Pressing "Start" button again in "Output" dialog repeats the same action. So you may record more than one disc without having to specify all those options again.

Some future plans:

  • Add copy CD support
  • OGG/Vorbis, WMA and MP3 decoding support
Useful links:

http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html - Main CDR Tools (CDRecord) site
http://www.geoshock.com/cdrtools/ - a source of recent CDR Tools updates
http://www.faqs.org/faqs/cdrom/cd-recordable/part1/ - great place to learn more about cd recording


Version 1.2 release notes

New features and changes added in version 1.4

  • Added multisession support
  • Added CUE sheet support (CUE/BIN images burning)
  • Added overburn support
  • Added input-charset and output-charset support and now you can select a code page for directory and file names
  • Added support for long joliet file names in ISO relax options
  • Added new CD blank options (Blank a track, Unreserve a reserved track, Blank the tail of a track)
  • Added "Burn with CDR Tools" option to Windows Explorer context menu for .iso and .cue file extensions
  • Added "All tracks into one file" option for extracting audio tracks
  • Added options dialog when you could select various front end options
  • Added support for printing the drive capabilities for SCSI-3/mmc compliant drives to "Specific and initial tasks" dialog
  • Added "Load from path-list" support to Visual ISO
  • Improved Audio files selection dialog - now resizable
  • Added "paranoia" library support for extracting audio CD tracks
  • Added CDDB lookup support for extracting audio CD tracks
  • Added interactive CDDB choice mode for extracting audio CD tracks
  • Added support for "copy permitted" mode while creating Audio CDs
  • Added support for using the .inf files created by CDDA2WAV while creating Audio CDs
  • Added support for creating Audio CDs with CD text
  • Improved "Record CD on the fly" option once again. You should try it :)
  • Added "Import file list" button for Audio file list selection dialog. You can use it to import a text file contents into the list. Supported formats are path-list (generated from Visual ISO) and plain text "one line one file name" format. Note that the list is cleared before importing!


License

CDR Tools Front End (Win32) Copyright © 2001-2004 Demosten

License:

CDR Tools Front End is Freeware. All kinds of usage are allowed (including commercial). You may copy and distribute it free. You may not charge money for my Front End!

Disclaimer:

NO WARRANTY

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.


Language HOWTO

This HOWTO describes the creation of new translation of CDR Tools Front End by Demosten

First some forewords about the terms used inside this document.

  • language directory - "language" is a subdirectory of the directory you have installed the CDR Tools Front End
  • "Select language" dialog - This dialog appears by selecting "Language ..." from the application system menu (system menu is the one showed when you click on the running application icon (in the upper left corner of the main application window).

How to create a new translation step by step

  1. Create new .INI file from a template. You could use a copy of Example.INI (the English template) included with Front End installation or a copy of some other .INI file in your language directory containing a language you will translate from. All INI files there (*.ini) are checked for a valid language format and displayed as available languages in the "Select language" dialog. It is a good idea to use a language name as a file name but this is not compulsory. The file name extension must be INI. Examples: English.ini, Bulgarian.ini or BlahBlah.ini
  2. Open your file with a text editor (like notepad).
  3. Fill up the necessary fields in [MAIN] section. Only "language=" field is compulsory.
  4. Start replacing the text in other fields with text in your language. Please try to keep your translated text as short as possible in order to fit in within Front End dialogs. Some translation hints:
    • \r\n means new line (in fact \r is ignored and \n is the new line)
    • Please note %s, %u and %d strings, and keep them inside your translations. They are replaced later by the Front End (%s with a string, %d with a number and %u with an unsigned number).
    • Every time you open a dialog, it reloads its translation. You won't have to restart the Front End every time you made a change (just close the dialog and reopen it to see the result). Don't forget to save the .ini file before preview it as I did in the beginning ;)
  5. Save your file as a plain text file.
  6. You could send your translation to me ( stjordanov@hotmail.com ) so I can include it in my CDR Tools Front End installation.


Version history

Version 1.4 final (released 29.07.2004)

  • Updated help file - no more CD recording FAQ, added some future plans

Version 1.4 beta (released 27.06.2004)

  • Language functionality is back again. Please send me your translations!
  • Added default write method Track At Once (TAO). It was default in the previous CDR Tools versions, but now it should be explicitly specified using the command line. This might become a problem for those who use -rawXXX method in the custom options. Please send me your feedback.
  • Help file is back (updated)
  • Installer now comes with CDR Tools version 2.01a32
  • Changed some options to appear with alternative names because they are reserved by POSIX.1-2001 for other purposes. This might lead to some options not working correctly if my front end is used with CDR Tools version prior 2.01a32

Version 1.4 dev 3 (released 01.03.2004)

  • Added "Import file list" button for Audio file list selection dialog. You can use it to import a text file contents into the list. Supported formats are path-list (generated from Visual ISO) and plain text "one line one file name" format. Note that the list is cleared before importing!
  • Added "Allow only 16 characters in volume name" option in settings dialog.
  • Improved user interface, now "Multisession options" button displays the current selection
  • Improved installer. Now it can use the front end to scan for available CD drives and can try to download and install an ASPI layer for you in case of an error.
  • More minor user interface tweaks
  • Fixed a bug in Visual ISO resulting in not displaying the proper progress bar value and incorrect total size while loading a file which is blocked by another application

Version 1.4 dev 2 (released 13.01.2004)

  • Added "paranoia" library support for extracting audio CD tracks
  • Added CDDB lookup support for extracting audio CD tracks
  • Added interactive CDDB choice mode for extracting audio CD tracks
  • Added support for "copy permitted" mode while creating Audio CDs
  • Added support for using the .inf files created by CDDA2WAV while creating Audio CDs
  • Added support for creating Audio CDs with CD text
  • Added an option for adding a new session without merging the old one's content
  • Improved "Record CD on the fly" option once again. You should try it :)
  • Improved "No CD drives found" dialog (more information added)
  • Fixed log file support introduced in version 1.4 dev
  • Fixed mixed mode support
  • Fixed a bug resulting in some of the options like Multisession and FIFO size not to work in Audio and Mixed mode CDs
  • Fixed a small bug in Visual ISO resulting in not displaying the proper progress bar value while loading a file from a command line option

Version 1.4 dev (released 07.01.2004)

  • Added multisession support
  • Added CUE sheet support (CUE/BIN images burning)
  • Added overburn support
  • Added input-charset and output-charset support and now you can select a code page for directory and file names
  • Added support for long joliet file names in ISO relax options
  • Added new CD blank options (Blank a track, Unreserve a reserved track, Blank the tail of a track)
  • Added "Burn with CDR Tools" option to Windows Explorer context menu for .iso and .cue file extensions
  • Added "All tracks into one file" option for extracting audio tracks
  • Added options to select CDR Tools output font, font colour and window background
  • Added options log CDR Tools output into a file (overwrite and append modes)
  • Added an option to start operations immediately instead of having to press the "Start" button
  • Added an option to allow only one pressing of the "Start" button
  • Added support for printing the drive capabilities for SCSI-3/mmc compliant drives to "Specific and initial tasks" dialog
  • Added "Load from path-list" support to Visual ISO
  • Fixed a bug in Visual ISO image size progress bar resulting in invalid size shown
  • Improved "Record CD on the fly" option which creates ISO and CD in one step. You should try it! I'm using it almost all the time :) Just remember to set bigger FIFO size in "cdrecord options" dialog. Something between 8 and 64 Mb should do the job.
  • Improved Visual ISO to CDR Tools Front End integration
  • Improved Audio files selection dialog - now resizable
  • Temporary removed Multilanguage support - version in development
  • Temporary removed Help file - version in development
  • Visual ISO version now is 1.1 beta

Version 1.3 final (released 08.11.2003)

  • Updated help file (latest CDROM FAQ)
  • Installer now comes with CDR Tools version 2.01a19
  • Installer now has multilanguage support
  • Smaller installer using better compression (7-zip)

Version 1.3 beta 3 (released 02.06.2003)

  • Fixed "default path" problem when using "Record CD on the fly" option
  • Fixed a minor problem in Visual ISO that doesn't allow the user to select network folder when using the "Add folder" button
  • Installer now comes with CDR Tools version 2.01a15
  • Minor installer improvements

Version 1.3 beta 2 (released 05.05.2003)

  • Added bootable CD support (single mode boot from a floppy diskette image)
  • Added an option to create an image file from a floppy disk
  • Added an option for minimizing the grace time (seconds before burning start)

Version 1.3 beta (released 28.03.2003)

  • New more visual way to add audio files to Audio and Mixed mode CDs
  • Added Splash screen to show while Front End initializes at startup
  • Added support for Windows XP Themes - now looks better under Windows XP
  • Some dialogs are extended to fit the translation texts
  • Minor code improvements and some unnecessary code was removed

Version 1.2 final (released 11.03.2003)

  • Installation now comes with CDR Tools 2.0 final
  • Updated help file (updated manual pages, readme files and latest CDROM FAQ)

Version 1.2 beta 4 (released 05.12.2002)

  • Fixed CDR Tools Front End error with changing folders and refusing to start CDR Tools executables when the user browse for a file in different folder.
  • Fixed some incorrect file/folder checks in CDR Tools Front End (mkisofs options dialog)
  • Visual ISO now outputs with LF only instead of CR+LF
  • Improved Drag and Drop on ISO tree behavior in Visual ISO
  • Added "Run Windows Explorer" button to Visual ISO toolbar

Version 1.2 beta 3 (released 02.12.2002)

  • Added "Save As" functionality to Visual ISO
  • Small internal improvements to Visual ISO to make future translation support easier
  • Minor interface improvements

Version 1.2 beta 2 (released 29.11.2002)

  • Fixed a bug in Visual ISO, which causes all system icons to disappear after user close it, inside Windows 9x/ME
  • Added German translation to version 1.2! Thanks to Thomas Kaes
  • Installer now comes with CDR Tools version 1.11a40

Version 1.2 beta (released 26.11.2002)

  • Added "Create ISO from multiply directories/drives" via "Visual ISO" project. More information in the release notes.
  • Added support for path lists to the Front End

Additional translations added to version 1.1 final

  • French translation by Jalv
  • Spanish translation by Juan Hernández
  • Magyar (Hungarian) translation by Sharky

Version 1.1 final (released 16.09.2002)

  • Added Dutch translation! Thanks to Bert van Velsen
  • Added Polish translation! Thanks to Wojtek Wasilewski
  • Updated help file

Version 1.1 beta 3 (released 12.08.2002)

  • Added German translation! Thanks to Thorsten Ebeling
  • Fixed a bug help file displaying under Windows 9x/ME. Thanks to Thorsten Ebeling
  • Fixed a bug with "Directory select" dialogs under Windows 9x/ME. Thanks to Thorsten Ebeling
  • Improved translation system

Version 1.1 beta 2 (released 12.07.2002)

  • Fixed support for directories containing spaces. Thanks to Andrea Vangelista
  • Fixed a bug in HFS options construction
  • Fixed bugs with values containing spaces in "Advanced ISO id options" and "Select HFS options" dialogs
  • Fixed a bug which causes the "Erase CDRW disk" option not to be remembered and automatically selected on next start

Version 1.1 beta (released 07.05.2002)

  • Added Multilanguage support. (see Language HOWTO)
  • Added "Record CD on the fly" option in "Select cdrecord options" dialog. This allows you to create a CD image and record it at the same time.
  • Added option for burnproof. (cdrecord -driveropts=burnproof) in "Select cdrecord options" dialog
  • Added option for FIFO size. (cdrecord fs=) in "Select cdrecord options" dialog
  • Added "Set Disk At Once (DAO) mode" in "Select cdrecord options" dialog
  • Added many "ISO relax options" in "Select mkisofs options" dialog
  • Added HFS support in "Select mkisofs options" dialog
  • Added "Hide TRANS.TBL from Joliet tree" option in "Select mkisofs options" dialog
  • Added "Select extract directory" option in "Select cdda2wav options" dialog
  • Added "Show disc ATIP information" (cdrecord -atip) option in "Specific and initial tasks" dialog
  • Added some small interface improvements.
  • Removed lame encoder Front End support

Version 1.0 - Initial version (released 03.2001)


Manpage of CDRECORD

CDRECORD

Section: Schily\'s USER COMMANDS (1)
Updated: Version 2.0
Index Return to Main Contents

NAME

cdrecord - record audio or data Compact Disks or Digital Versatile Disks from a master

SYNOPSIS

cdrecord [ general options ] dev=device [ track options ] track1...trackn

DESCRIPTION

Cdrecord is used to record data or audio Compact Discs on an Orange Book CD-Recorder or to write DVD media on a DVD-Recorder.

The device refers to scsibus/target/lun of the CD/DVD-Recorder. Communication on SunOS is done with the SCSI general driver scg. Other operating systems are using a library simulation of this driver. Possible syntax is: dev= scsibus,target,lun or dev= target,lun. In the latter case, the CD/DVD-Recorder has to be connected to the default SCSI bus of the machine. Scsibus, target and lun are integer numbers. Some operating systems or SCSI transport implementations may require to specify a filename in addition. In this case the correct syntax for the device is: dev= devicename:scsibus,target,lun or dev= devicename:target,lun. If the name of the device node that has been specified on such a system refers to exactly one SCSI device, a shorthand in the form dev= devicename:@ or dev= devicename:@,lun may be used instead of dev= devicename:scsibus,target,lun.

To access remote SCSI devices, you need to prepend the SCSI device name by a remote device indicator. The remote device indicator is either REMOTE:user@host: or .BIREMOTE:host:
A valid remote SCSI device name may be: REMOTE:user@host: to allow remote SCSI bus scanning or REMOTE:user@host:1,0,0 to access the SCSI device at host connected to SCSI bus # 1,target 0 lun 0.

Cdrecord is completely based on SCSI commands but this is no problem as all CD/DVD writers ever made use SCSI commands for the communication. Even ATAPI drives are just SCSI drives that inherently use the ATA packet interface as SCSI command transport layer build into the IDE (ATA) transport. You may need to specify an alternate transport layer on the command line if your OS does not implement a fully integrated kernel driver subsystem that allows to access any drive using SCSI commands via a single unique user interface.

To access SCSI devices via alternate transport layers, you need to prepend the SCSI device name by a transport layer indicator. The transport layer indicator may be something like USCSI: or ATAPI:. To get a list of supported transport layers for your platform, use dev= HELP:

To make cdrecord portable to all UNIX platforms, the syntax dev= devicename:scsibus,target,lun is preferred as it hides OS specific knowledge about device names from the user. A specific OS may not necessarily support a way to specify a real device file name nor a way to specify scsibus,target,lun.

Scsibus 0 is the default SCSI bus on the machine. Watch the boot messages for more information or look into /var/adm/messages for more information about the SCSI configuration of your machine. If you have problems to figure out what values for scsibus,target,lun should be used, try the -scanbus option of cdrecord described below.

If a file /etc/default/cdrecord exists, the parameter to the dev= option may also be a drive name label in said file (see FILES section).

On SVr4 compliant systems, cdrecord uses the real time class to get the highest scheduling priority that is possible (higher than all kernel processes). On systems with POSIX real time scheduling cdrecord uses real time scheduling too, but may not be able to gain a priority that is higher than all kernel processes.

In order to be able to use the SCSI transport subsystem of the OS, run at highest priority and lock itself into core cdrecord either needs to be run as root, needs to be installed suid root or must be called via RBACs pfexec mechanism.

In Track At Once mode, each track corresponds to a single file that contains the prepared data for that track. If the argument is `-', standard input is used for that track. Only one track may be taken from stdin. In the other write modes, the direct file to track relation may not be implemented. In -clone mode, a single file contains all data for the whole disk. To allow DVD writing on platforms that do not implement large file support, cdrecord concatenates all file arguments to a single track when writing to DVD media.

GENERAL OPTIONS

General options must be before any track file name or track option.

-version
Print version information and exit.
-v
Increment the level of general verbosity by one. This is used e.g. to display the progress of the writing process.
-V
Increment the verbose level in respect of SCSI command transport by one. This helps to debug problems during the writing process, that occur in the CD/DVD-Recorder. If you get incomprehensible error messages you should use this flag to get more detailed output. -VV will show data buffer content in addition. Using -V or -VV slows down the process and may be the reason for a buffer underrun.
debug=#, -d
Set the misc debug value to # (with debug=#) or increment the misc debug level by one (with -d). If you specify -dd, this equals to debug=2. This may help to find problems while opening a driver for libscg as well as with sector sizes and sector types. Using -debug slows down the process and may be the reason for a buffer underrun.
kdebug=#, kd=#
Tell the scg-driver to modify the kernel debug value while SCSI commands are running.
-silent, -s
Do not print out a status report for failed SCSI commands.
-force
Force to continue on some errors. Be careful when using this option. Cdrecord implements several checks that prevent you from doing unwanted things like damaging CD-RW media by improper drives. Many of the sanity checks are disabled when the -force option is used.

This option also implements some tricks that will allow you to blank bad CD-RW disks.

-immed
Tell cdrecord to set the SCSI IMMED flag in certain commands (load/eject/blank/close_track/close_session). This can be useful on broken systems with ATAPI harddisk and CD/DVD writer on the same bus or with SCSI systems that don't use disconnect/reconnect. These systems will freeze while blanking or fixating a CD/DVD or while a DVD writer is filling up a session to the minimum amount (approx. 800 MB). Setting the -immed flag will request the command to return immediately while the operation proceeds in background, making the bus usable for the other devices and avoiding the system freeze. This is an experimental feature which may work or not, depending on the model of the CD/DVD writer. A correct solution would be to set up a correct cabling but there seem to be notebooks around that have been set up the wrong way by the manufacturer. As it is impossible to fix this problem in notebooks, the -immed option has been added.

A second experimental feature of the -immed flag is to tell cdrecord to try to wait short times while writing to the media. This is expected to free the IDE bus if the CD/DVD writer and the data source are connected to the same IDE cable. In this case, the CD/DVD writer would otherwise usually block the IDE bus for nearly all the time making it impossible to fetch data from the source drive. See also minbuf= and -v option.

Use both features at your own risk. If it turns out that it would make sense to have a separate option for the wait feature, write to the author and convince him.

minbuf=value
The # minbuf= option allows to define the minimum drive buffer fill ratio for the experimental ATAPI wait mode that is intended to free the IDE bus to allow hard disk and CD/DVD writer to be on the same IDE cable. As the wait mode currently only works when the verbose option -v has been specified, cdrecord implies the verbose option in case the -immed or minbuf= option have been specified. Valid values for minbuf= are between 25 and 95 for 25%...95% minimum drive buffer fill ratio.
-dummy
The CD/DVD-Recorder will go through all steps of the recording process, but the laser is turned off during this procedure. It is recommended to run several tests before actually writing to a Compact Disk or Digital Versatile Disk, if the timing and load response of the system is not known.
-clone
Tells cdrecord to handle images created by readcd -clone. The -clone may only be used in conjunction with with the -raw96r or with the -raw16 option. Using -clone together with -raw96r is preferred as it allows to write all subchannel data. The option -raw16 should only be used with drives that do not support to write in -raw96r mode.
-dao
-sao
Set SAO (Session At Once) mode which is usually called Disk At Once mode. This currently only works with MMC drives that support Session At Once mode. Note that cdrecord needs to know the size of each track in advance for this mode (see the mkisofs -print-size option and the EXAMPLES section for more information).
-tao
Set TAO (Track At Once) writing mode. This is the default write mode in previous cdrecord versions. With most drives, this write mode is required for multi session recording.
-raw
Set RAW writing mode. Using this option defaults to -raw96r. Note that cdrecord needs to know the size of each track in advance for this mode (see the mkisofs -print-size option and the EXAMPLES section for more information).
-raw96r
Select Set RAW writing mode with 2352 byte sectors plus 96 bytes of raw P-W subchannel data resulting in a sector size of 2448 bytes. This is the preferred raw writing mode as it gives best control over the CD writing process. If you find any problems with the layout of a disk or with sub channel content (e.g. wrong times on the display when playing the CD) and your drive supports to write in -raw96r or -raw16 mode, you should give it a try. There are several CD writers with bad firmware that result in broken disks when writing in TAO or SAO mode. Writing data disks in raw mode needs significantly more CPU time than other write modes. If your CPU is too slow, this may result in buffer underruns. Note that cdrecord needs to know the size of each track in advance for this mode (see the mkisofs -print-size option and the EXAMPLES section for more information).
-raw96p
Select Set RAW writing mode with 2352 byte sectors plus 96 bytes of packed P-W subchannel data resulting in a sector size of 2448 bytes. This is the less preferred raw writing mode as only a few recorders support it and some of these recorders have bugs in the firmware implementation. Don't use this mode if your recorder supports -raw96r or -raw16. Writing data disks in raw mode needs significantly more CPU time than other write modes. If your CPU is too slow, this may result in buffer underruns. Note that cdrecord needs to know the size of each track in advance for this mode (see the mkisofs -print-size option and the EXAMPLES section for more information).
-raw16
Select Set RAW writing mode with 2352 byte sectors plus 16 bytes of P-Q subchannel data resulting in a sector size of 2368 bytes. If a recorder does not support -raw96r, this is the preferred raw writing mode. It does not allow to write CD-Text or CD+Graphics but it is the only raw writing mode in cheap CD writers. As these cheap writers in most cases do not support -dao mode. Don't use this mode if your recorder supports -raw96r. Writing data disks in raw mode needs significantly more CPU time than other write modes. If your CPU is too slow, this may result in buffer underruns. Note that cdrecord needs to know the size of each track in advance for this mode (see the mkisofs -print-size option and the EXAMPLES section for more information).
-multi
Allow multi session CDs to be made. This flag needs to be present on all sessions of a multi session disk, except you want to create a session that will be the last session on the media. The fixation will be done in a way that allows the CD/DVD-Recorder to append additional sessions later. This is done by generation a TOC with a link to the next program area. The so generated media is not 100% compatible to manufactured CDs (except for CDplus). Use only for recording of multi session CDs. If this option is present, the default track type is CD-ROM XA mode 2 form 1 and the sector size is 2048 bytes. The XA sector subheaders will be created by the drive. The Sony drives have no hardware support for CD-ROM XA mode 2 form 1. You have to specify the -data option in order to create multi session disks on these drives. As long as cdrecord does not have a coder for converting data sectors to audio sectors, you need to force CD-ROM sectors by including the -data option if you like to record a multisession disk in SAO mode. Not all drives allow multisession CDs in SAO mode.
-msinfo
Retrieve multi session info in a form suitable for mkisofs-1.10 or later.

This option makes only sense with a CD that contains at least one closed session and is appendable (not finally closed yet). Some drives create error messages if you try to get the multi session info for a disk that is not suitable for this operation.

-toc
Retrieve and print out the table of content or PMA of a CD. With this option, cdrecord will work with CD-R drives and with CD-ROM drives.
-atip
Retrieve and print out the ATIP (absolute Time in Pre-groove) info of a CD/DVD recordable or CD/DVD re-writable media. With this option, cdrecord will try to retrieve the ATIP info. If the actual drive does not support to read the ATIP info, it may be that only a reduced set of information records or even nothing is displayed. Only a limited number of MMC compliant drives support to read the ATIP info.

If cdrecord is able to retrieve the lead-in start time for the first session, it will try to decode and print the manufacturer info from the media. DVD media does not have ATIP information but there is equivalent prerecorded information that is read out and printed.

-fix
The disk will only be fixated (i.e. a TOC for a CD-Reader will be written). This may be used, if for some reason the disk has been written but not fixated. This option currently does not work with old TEAC drives (CD-R50S and CD-R55S).
-nofix
Do not fixate the disk after writing the tracks. This may be used to create an audio disk in steps. An un-fixated disk can usually not be used on a non CD-writer type drive but there are audio CD players that will be able to play such a disk.
-waiti
Wait for input to become available on standard input before trying to open the SCSI driver. This allows cdrecord to read it's input from a pipe even when writing additional sessions to a multi session disk. When writing another session to a multi session disk, mkisofs needs to read the old session from the device before writing output. This cannot be done if cdrecord opens the SCSI driver at the same time.
-load
Load the media and exit. This only works with a tray loading mechanism but seems to be useful when using the Kodak disk transporter.
-lock
Load the media, lock the door and exit. This only works with a tray loading mechanism but seems to be useful when using the Kodak disk transporter.
-eject
Eject disk after doing the work. Some devices (e.g. Philips) need to eject the medium before creating a new disk. Doing a -dummy test and immediately creating a real disk would not work on these devices.
speed=#
Set the speed factor of the writing process to #. # is an integer, representing a multiple of the audio speed. This is about 150 KB/s for CD-ROM, about 172 KB/s for CD-Audio and about 1385 kB/s for DVD media. If no speed option is present, cdrecord will try to get a drive specific speed value from the file /etc/default/cdrecord and if it cannot find one, it will try to get the speed value from the CDR_SPEED environment and later from the CDR_SPEED= entry in /etc/default/cdrecord. If no speed value could be found, cdrecord uses a drive specific default speed. The default for all new (MMC compliant) drives is to use the maximum supported by the drive. If you use speed=0 with a MMC compliant drive, cdrecord will switch to the lowest possible speed for drive and medium. If you are using an old (non MMC) drive that has problems with speed=2 or speed=4, you should try speed=0.
blank=type
Blank a CD-RW and exit or blank a CD-RW before writing. The blanking type may be one of:
help
Display a list of possible blanking types.
all
Blank the entire disk. This may take a long time.
fast
Minimally blank the disk. This results in erasing the PMA, the TOC and the pregap.
track
Blank a track.
unreserve
Unreserve a reserved track.
trtail
Blank the tail of a track.
unclose
Unclose last session.
session
Blank the last session.
Not all drives support all blanking types. It may be necessary to use blank=all if a drive reports a specified command as being invalid. If used together with the -force flag, this option may be used to blank CD-RW disks that otherwise cannot be blanked. Note that you may need to specify blank=all because some drives will not continue with certain types of bad CD-RW disks. Note also that cdrecord does it's best if the -force flag is used but it finally depends on the drive's firmware whether the blanking operation will succeed or not.
-format
Format a CD-RW/DVD-RW/DVD+RW disc. Formatting is currently only implemented for DVD+RW media. A 'maiden' DVD+RW media needs to be formatted before you may write to it. However, as cdrecord autodetects the need for formatting in this case and auto formats the medium before it starts writing, the -format option is only needed if you like to forcibly reformat a DVD+RW medium.
fs=#
Set the FIFO (ring buffer) size to #. You may use the same syntax as in dd(1), sdd(1) or star(1). The number representing the size is taken in bytes unless otherwise specified. If a number is followed directly by the letter `b', `k', `m', `s' or `f', the size is multiplied by 512, 1024, 1024*1024, 2048 or 2352. If the size consists of numbers separated by `x' or `*', multiplication of the two numbers is performed. Thus fs=10x63k will specify a FIFO size of 630 kBytes.

The size specified by the fs= argument includes the shared memory that is needed for administration. This is at least one page of memory. If no fs= option is present, cdrecord will try to get the FIFO size value from the CDR_FIFOSIZE environment. The default FIFO size is currently 4 MB.

The FIFO is used to increase buffering for the real time writing process. It allows to run a pipe from mkisofs directly into cdrecord. If the FIFO is active and a pipe from mkisofs into cdrecord is used to create a CD, cdrecord will abort prior to do any modifications on the disk if mkisofs dies before it starts writing. The recommended FIFO size is between 4 and 128 MBytes. As a rule of thumb, the FIFO size should be at least equal to the size of the internal buffer of the CD/DVD-Recorder and no more than half of the physical amount of RAM available in the machine. If the FIFO size is big enough, the FIFO statistics will print a FIFO empty count of zero and the FIFO min fill is not below 20%. It is not wise to use too much space for the FIFO. If you need more than 8 MB to write a CD at a speed less than 20x from an image on a local file system on an idle machine, your machine is either underpowered, has hardware problems or is mis-configured. If you like to write DVDs or to write CDs at higher speed, it makes sense to use at least 16 MB for the FIFO.

On old and small machines, you need to be more careful with the FIFO size. If your machine has less than 256 MB of physical RAM, you should not set up a FIFO size that is more than 32 MB. The sun4c architecture (e.g. a Sparcstation-2) has only MMU page table entries for 16 MBytes per process. Using more than 14 MBytes for the FIFO may cause the operating system in this case to spend much time to constantly reload the MMU tables. Newer machines from Sun do not have this MMU hardware problem. I have no information on PC-hardware reflecting this problem.

Old Linux systems for non x86 platforms have broken definitions for the shared memory size. You need to fix them and rebuild the kernel or manually tell cdrecord to use a smaller FIFO.

If you have buffer underruns or similar problems (like a constantly empty drive buffer) and observe a zero fifo empty count, you have hardware problems that prevents the data from flowing fast enough from the kernel memory to the drive. The FIFO size in this case is sufficient, but you should check for a working DMA setup.

ts=#
Set the maximum transfer size for a single SCSI command to #. The syntax for the ts= option is the same as for cdrecord fs=# or sdd bs=#.

If no ts= option has been specified, cdrecord defaults to a transfer size of 63 kB. If libscg gets lower values from the operating system, the value is reduced to the maximum value that is possible with the current operating system. Sometimes, it may help to further reduce the transfer size or to enhance it, but note that it may take a long time to find a better value by experimenting with the ts= option.

dev=target
Sets the SCSI target for the CD/DVD-Recorder, see notes above. A typical device specification is dev=6,0 . If a filename must be provided together with the numerical target specification, the filename is implementation specific. The correct filename in this case can be found in the system specific manuals of the target operating system. On a FreeBSD system without CAM support, you need to use the control device (e.g. /dev/rcd0.ctl). A correct device specification in this case may be dev=/dev/rcd0.ctl:@ .

On Linux, drives connected to a parallel port adapter are mapped to a virtual SCSI bus. Different adapters are mapped to different targets on this virtual SCSI bus.

If no dev option is present, cdrecord will try to get the device from the CDR_DEVICE environment.

If the argument to the dev= option does not contain the characters ',', '/', '@' or ':', it is interpreted as an label name that may be found in the file /etc/default/cdrecord (see FILES section).

gracetime=#
Set the grace time before starting to write to # seconds. Values below 2 seconds are not allowed.
timeout=#
Set the default SCSI command timeout value to # seconds. The default SCSI command timeout is the minimum timeout used for sending SCSI commands. If a SCSI command fails due to a timeout, you may try to raise the default SCSI command timeout above the timeout value of the failed command. If the command runs correctly with a raised command timeout, please report the better timeout value and the corresponding command to the author of the program. If no timeout option is present, a default timeout of 40 seconds is used.
driver=name
Allows the user to manually select a driver for the device. The reason for the existence of the driver=name option is to allow users to use cdrecord with drives that are similar to supported drives but not known directly by cdrecord. All drives made after 1997 should be MMC standard compliant and thus supported by one of the MMC drivers. It is most unlikely that cdrecord is unable to find the right driver automatically. Use this option with extreme care. If a wrong driver is used for a device, the possibility of creating corrupted disks is high. The minimum problem related to a wrong driver is that the -speed or -dummy will not work.

The following driver names are supported:

help
To get a list of possible drivers together with a short description.
mmc_cd
The generic SCSI-3/mmc CD-ROM driver is auto-selected whenever cdrecord finds a MMC compliant drive that does not identify itself to support writing at all, or that only identifies to support media or write modes not implemented in cdrecord.
mmc_cd_dvd
The generic SCSI-3/mmc CD/DVD driver is auto-selected whenever cdrecord finds a MMC-2 or MMC-3 compliant drive that seems to support more than one medium type and the tray is open or no medium could be found to select the right driver. This driver tries to close the tray, checks the medium found in the tray and then branches to the driver that matches the current medium.
mmc_cdr
The generic SCSI-3/mmc CD-R/CD-RW driver is auto-selected whenever cdrecord find a MMC compliant drive that only supports to write CDs or a multi system drive that contains a CD as the current medium.
mmc_cdr_sony
The generic SCSI-3/mmc CD-R/CD-RW driver is auto-selected whenever cdrecord would otherwise select the mmc_cdr driver but the device seems to be made by Sony. The mmc_cdr_sony is definitely needed for the Sony CDU 928 as this drive does not completely implement the MMC standard and some of the MMC SCSI commands have to be replaced by Sony proprietary commands. It seems that all Sony drives (even newer ones) still implement the Sony proprietary SCSI commands so it has not yet become a problem to use this driver for all Sony drives. If you find a newer Sony drive that does not work with this driver, please report.
mmc_dvd
The generic SCSI-3/mmc-2 DVD-R/DVD-RW driver is auto-selected whenever cdrecord finds a MMC-2 or MMC-3 compliant drive that supports to write DVDs and an appropriate medium is loaded. There is no Track At Once mode for DVD writers.
mmc_dvdplus
The generic SCSI-3/mmc-3 DVD+R/DVD+RW driver is auto-selected whenever one of the DVD+ media types that are incompatible to each other is found. It checks media and then branches to the driver that matches the current medium.
mmc_dvdplusr
The generic SCSI-3/mmc-3 DVD+R driver is auto-selected whenever a DVD+R medium is found in an appropriate writer. Note that for unknown reason, the DVD-Plus alliance does not like that there is a simulation mode for DVD+R media. The author of cdrecord tries to convince manufacturers to implement a simulation mode for DVD+R and implement support. DVD+R only supports one write mode that is somewhere between Track At Once and Packet writing; this mode is selected in cdrecord via a the -dao/-sao option.
mmc_dvdplusrw
The generic SCSI-3/mmc-3 DVD+RW driver is auto-selected whenever a DVD+RW medium is found in an appropriate writer. As DVD+RW media needs to be formatted before it's first use, cdrecord auto-detects this media state and performs a format before it starts to write. Note that for unknown reason, the DVD-Plus alliance does not like that there is a simulation mode nor a way to erase DVD+RW media. DVD+RW only supports one write mode that is close to Packet writing; this mode is selected in cdrecord via a the -dao/-sao option.
cw_7501
The driver for Matsushita/Panasonic CW-7501 is auto-selected when cdrecord finds this old pre MMC drive. Cdrecord supports all write modes for this drive type.
kodak_pcd_600
The driver for Kodak PCD-600 is auto-selected when cdrecord finds this old pre MMC drive which has been the first high speed (6x) CD writer for a long time. This drive behaves similar to the Philips CDD-521 drive.
philips_cdd521
The driver for Philips CDD-521 is auto-selected when cdrecord finds a Philips CDD-521 drive (which is the first CD writer ever made) or one of the other drives that are known to behave similar to this drive. All Philips CDD-521 or similar drives (see other drivers in this list) do not support Session At Once recording.
philips_cdd521_old
The driver for Philips old CDD-521 is auto-selected when cdrecord finds a Philips CDD-521 with very old firmware which has some known limitations.
philips_cdd522
The driver for Philips CDD-522 is auto-selected when cdrecord finds a Philips CDD-522 which is the successor of the 521 or one of it's variants with Kodak label. Cdrecord does not support Session At Once recording with these drives.
philips_dumb
The driver for Philips CDD-521 with pessimistic assumptions is never auto-selected. It may be used by hand with drives that behave similar to the Philips CDD-521.
pioneer_dws114x
The driver for Pioneer DW-S114X is auto-selected when cdrecord finds one of the old non MMC CD writers from Pioneer.
plasmon_rf4100
The driver for Plasmon RF 4100 is auto-selected when cdrecord finds this specific variant of the Philips CDD-521.
ricoh_ro1060c
The driver for Ricoh RO-1060C is auto-selected when cdrecord finds this drive. There is no real support for this drive yet.
ricoh_ro1420c
The driver for Ricoh RO-1420C is auto-selected when cdrecord finds a drive with this specific variant of the Philips CDD-521 command set.
scsi2_cd
The generic SCSI-2 CD-ROM driver is auto-selected whenever cdrecord finds a pre MMC drive that does not support writing or a pre MMC writer that is not supported by cdrecord.
sony_cdu924
The driver for Sony CDU-924 / CDU-948 is auto-selected whenever cdrecord finds one of the old pre MMC CD writers from Sony.
teac_cdr50
The driver for Teac CD-R50S, Teac CD-R55S, JVC XR-W2010, Pinnacle RCD-5020 is auto-selected whenever one of the drives is found that is known to the non MMC command set used by TEAC and JVC. Note that many drives from JVC will not work because they do not correctly implement the documented command set and JVC has been unwilling to fix or document the bugs. There is no support for the Session At Once write mode yet.
tyuden_ew50
The driver for Taiyo Yuden EW-50 is auto-selected when cdrecord finds a drive with this specific variant of the Philips CDD-521 command set.
yamaha_cdr100
The driver for Yamaha CDR-100 / CDR-102 is auto-selected when cdrecord finds one of the old pre MMC CD writers from Yamaha. There is no support for the Session At Once write mode yet.
cdr_simul
The simulation CD-R driver allows to run timing and speed tests with parameters that match the behavior of CD writers.
dvd_simul
The simulation DVD-R driver allows to run timing and speed tests with parameters that match the behavior of DVD writers.

There are two special driver entries in the list: cdr_simul and dvd_simul. These driver entries are designed to make timing tests at any speed or timing tests for drives that do not support the -dummy option. The simulation drivers implement a drive with a buffer size of 1 MB that can be changed via the CDR_SIMUL_BUFSIZE environment variable. The simulation driver correctly simulates even a buffer underrun condition. If the -dummy option is present, the simulation is not aborted in case of a buffer underrun.

driveropts=option list
Set driver specific options. The options are specified a comma separated list. To get a list of valid options use driveropts=help together with the -checkdrive option. If you like to set driver options without running a typical cdrecord task, you need to use the -setdropts option in addition, otherwise the command line parser in cdrecord will complain. Currently implemented driver options are:
burnfree
Turn the support for Buffer Underrun Free writing on. This only works for drives that support Buffer Underrun Free technology. This may be called: Sanyo BURN-Proof, Ricoh Just-Link, Yamaha Lossless-Link or similar.

The default is to turn BURN-Free off, regardless of the defaults of the drive.

noburnfree
Turn the support for Buffer Underrun Free writing off.
varirec=value
Turn on the Plextor VariRec writing mode. The mandatory parameter value is the laser power offset and currently may be selected from -2, -1, 0, 1, 2. In addition, you need to set the write speed to 4 in order to allow VariRec to work.
audiomaster
Turn on the Yamaha Audio Master Q. R. feature which usually should result in high quality CDs that have less reading problems in Hi-Fi players. As this is implemented as a variant of the Session at Once write mode, it will only work if you select SAO write mode and there is no need to turn it off. The Audio Master mode will work with a limited speed but may also be used with data CDs. In Audio Master mode, the pits on the CD will be written larger then usual so the capacity of the medium is reduced when turning this feature on. A 74 minute CD will only have a capacity of 63 minutes if Audio Master is active and the capacity of a 80 minute CD will be reduced to 68 minutes.
forcespeed
Normally, modern drives know the highest possible speed for different media and may reduce the speed in order to grant best write quality. This technology may be called: Plextor PowerRec, Ricoh Just-Speed, Yamaha Optimum Write Speed Control or similar. Some drives (e.g. Plextor, Ricoh and Yamaha) allow to force the drive to use the selected speed even if the medium is so bad that the write quality would be poor. This option tells such a drive to force to use the selected speed regardless of the medium quality.

Use this option with extreme care and note that the drive should know better which medium will work at full speed. The default is to turn forcespeed off, regardless of the defaults of the drive.

noforcespeed
Turn off the force speed feature.
speedread
Some ultra high speed drives such as 48x and faster drives from Plextor limit the read speed for unknown media to e.g. 40x in order to avoid damaged disks and drives. Using this option tells the drive to read any media as fast as possible. Be very careful as this may cause the media to break in the drive while reading, resulting in a damaged media and drive!
nospeedread
Turn off unlimited read speed.
singlesession
Turn the drive into a single session only drive. This allows to read defective or non-compliant (illegal) media with extremely non-standard additional (broken/illegal) TOC entries in the TOC from the second or higher session. Some of these disks become usable if only the information from the first session is used. You need to enable Single Session mode before you insert the defective disk!
nosinglesession
Turn off single session mode. The drive will again behave as usual.
hidecdr
Hide the fact that a medium might be a recordable medium. This allows to make CD-Rs look like CD-ROMs and applications believe that the media in the drive is not a CD-R.
nohidecdr
Turn off hiding CD-R media.
tattooinfo
Use this option together with -checkdrive to retrieve the image size information for the Yamaha DiskT@2 feature. The images always have a line length of 3744 pixel. Line number 0 (radius 0) is mapped to the center of the disk. If you know the inner and outer radius you will be able to create a pre distorted image that later may appear undistorted on the disk.
tattoofile=name
Use this option together with -checkdrive to write an image prepared for the Yamaha DiskT@2 feature to the medium. The file must be a file with raw image B&W data (one byte per pixel) in a size as retrieved by a previous call to tattoofile=name . If the size of the image equals the maximum possible size (3744 x 320 pixel), cdrecord will use the first part of the file. This first part then will be written to the leftover space on the CD.

Note that the image must be mirrored to be readable from the pick up side of the CD.

-setdropts
Set the driveropts specified by driveropts=option list, the speed of the drive and the dummy flag and exit. This allows cdrecord to set drive specific parameters that are not directly used by cdrecord like e.g. single session mode, hide cdr and similar. It is needed in case that driveropts=option list should be called without planning to run a typical cdrecord task.
-checkdrive
Checks if a driver for the current drive is present and exit. If the drive is a known drive, cdrecord uses exit code 0.
-prcap
Print the drive capabilities for SCSI-3/mmc compliant drives as obtained from mode page 0x2A. Values marked with kB use 1000 bytes as kilo-byte, values marked with KB use 1024 bytes as Kilo-byte.
-inq
Do an inquiry for the drive, print the inquiry info and exit.
-scanbus
Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may be used to find SCSI address of the CD/DVD-Recorder on a system. The numbers printed out as labels are computed by: bus * 100 + target
-reset
Try to reset the SCSI bus where the CD recorder is located. This works not on all operating systems.
-abort
Try to send an abort sequence to the drive. If you use cdrecord only, this should never be needed; but other software may leave a drive in an unusable condition. Calling cdrecord -reset may be needed if a previous write has been interrupted and the software did not tell the drive that it will not continue to write.
-overburn
Allow cdrecord to write more than the official size of a medium. This feature is usually called overburning and depends on the fact that most blank media may hold more space than the official size. As the official size of the lead-out area on the disk is 90 seconds (6750 sectors) and a disk usually works if there are at least 150 sectors of lead out, all media may be overburned by at least 88 seconds (6600 sectors). Most CD recorders only do overburning in SAO or RAW mode. Known exceptions are TEAC CD-R50S, TEAC CD-R55S and the Panasonic CW-7502. Some drives do not allow to overburn as much as you might like and limit the size of a CD to e.g. 76 minutes. This problem may be circumvented by writing the CD in RAW mode because this way the drive has no chance to find the size before starting to burn. There is no guarantee that your drive supports overburning at all. Make a test to check if your drive implements the feature.
-ignsize
Ignore the known size of the medium. This option should be used with extreme care, it exists only for debugging purposes don't use it for other reasons. It is not needed to write disks with more than the nominal capacity. This option implies -overburn.
-useinfo
Use *.inf files to overwrite audio options. If this option is used, the pregap size information is read from the *.inf file that is associated with the file that contains the audio data for a track.

If used together with the -audio option, cdrecord may be used to write audio CDs from a pipe from cdda2wav if you call cdrecord with the *.inf files as track parameter list instead of using audio files. The audio data is read from stdin in this case. See EXAMPLES section below. Cdrecord first verifies that stdin is not connected to a terminal and runs some heuristic consistency checks on the *.inf files and then sets the track lengths from the information in the *.inf files.

If you like to write from stdin, make sure that cdrecord is called with a large enough FIFO size, reduce the write speed to a value below the read speed of the source drive and switch the burn-free option for the recording drive on.

defpregap=#
Set the default pre-gap size for all tracks except track number 1. This option currently only makes sense with the TEAC drive when creating track-at-once disks without the 2 second silence before each track.
This option may go away in future.
-packet
Set Packet writing mode. This is an experimental interface.
pktsize=#
Set the packet size to #, forces fixed packet mode. This is an experimental interface.
-noclose
Do not close the current track, useful only when in packet writing mode. This is an experimental interface.
mcn=med_cat_nr
Set the Media Catalog Number of the CD to med_cat_nr.
-text
Write CD-Text information based on information taken from a file that contains ascii information for the text strings. Cdrecord supports CD-Text information based on the content of the *.inf files created by cdda2wav and CD-Text information based on the content from a CUE sheet file. If a CUE sheet file contains both (binary CDTEXTFILE and text based SONGWRITER) entries, then the information based on the CDTEXTFILE entry will win.

You need to use the -useinfo option in addition in order to tell cdrecord to read the *.inf files or cuefile=filename in order to tell cdrecord to read a CUE sheet file in addition. If you like to write your own CD-Text information, edit the *.inf files or the CUE sheet file with a text editor and change the fields that are relevant for CD-Text.

textfile=filename
Write CD-Text based on information found in the binary file filename. This file must contain information in a data format defined in the SCSI-3 MMC-2 standard and in the Red Book. The four byte size header that is defined in the SCSI standard is optional and allows to make the recognition of correct data less ambiguous. This is the best option to be used to copy CD-Text data from existing CDs that already carry CD-Text information. To get data in a format suitable for this option use cdrecord -vv -toc to extract the information from disk. If both, textfile=filename and CD-Text information from *.inf or *.cue files are present, textfile=filename will overwrite the other information.
cuefile=filename
Take all recording related information from a CDRWIN compliant CUE sheet file. No track files are allowed when this option is present and the option -dao is currently needed in addition.

TRACK OPTIONS

Track options may be mixed with track file names.

isrc=ISRC_number
Set the International Standard Recording Number for the next track to ISRC_number.
index=list
Sets an index list for the next track. In index list is a comma separated list of numbers that are counting from index 1. The first entry in this list must contain a 0, the following numbers must be an ascending list of numbers (counting in 1/75 seconds) that represent the start of the indices. An index list in the form: 0,7500,15000 sets index 1 to the start of the track, index 2 100 seconds from the start of the track and index 3 200 seconds from the start of the track.
-audio
If this flag is present, all subsequent tracks are written in CD-DA (similar to Red Book) audio format. The file with data for this tracks should contain stereo, 16-bit digital audio with 44100 samples/s. The byte order should be the following: MSB left, LSB left, MSB right, LSB right, MSB left and so on. The track should be a multiple of 2352 bytes. It is not possible to put the master image of an audio track on a raw disk because data will be read in multiple of 2352 bytes during the recording process.

If a filename ends in .au or .wav the file is considered to be a structured audio data file. Cdrecord assumes that the file in this case is a Sun audio file or a Microsoft .WAV file and extracts the audio data from the files by skipping over the non-audio header information. In all other cases, cdrecord will only work correctly if the audio data stream does not have any header. Because many structured audio files do not have an integral number of blocks (1/75th second) in length, it is often necessary to specify the -pad option as well. cdrecord recognizes that audio data in a .WAV file is stored in Intel (little-endian) byte order, and will automatically byte-swap the data if the CD recorder requires big-endian data. Cdrecord will reject any audio file that does not match the Red Book requirements of 16-bit stereo samples in PCM coding at 44100 samples/second.

Using other structured audio data formats as input to cdrecord will usually work if the structure of the data is the structure described above (raw pcm data in big-endian byte order). However, if the data format includes a header, you will hear a click at the start of a track.

If neither -data nor -audio have been specified, cdrecord defaults to -audio for all filenames that end in .au or .wav and to -data for all other files.
-swab
If this flag is present, audio data is assumed to be in byte-swapped (little-endian) order. Some types of CD-Writers e.g. Yamaha, Sony and the new SCSI-3/mmc drives require audio data to be presented in little-endian order, while other writers require audio data to be presented in the big-endian (network) byte order normally used by the SCSI protocol. Cdrecord knows if a CD-Recorder needs audio data in big- or little-endian order, and corrects the byte order of the data stream to match the needs of the recorder. You only need the -swab flag if your data stream is in Intel (little-endian) byte order.

Note that the verbose output of cdrecord will show you if swapping is necessary to make the byte order of the input data fit the required byte order of the recorder. Cdrecord will not show you if the -swab flag was actually present for a track.

-data
If this flag is present, all subsequent tracks are written in CD-ROM mode 1 (Yellow Book) format. The data size is a multiple of 2048 bytes. The file with track data should contain an ISO-9660 or Rock Ridge filesystem image (see mkisofs for more details). If the track data is an ufs filesystem image, fragment size should be set to 2 KB or more to allow CD-drives with 2 KB sector size to be used for reading.
-data is the default, if no other flag is present and the file does not appear to be of one of the well known audio file types.
If neither -data nor -audio have been specified, cdrecord defaults to -audio for all filenames that end in .au or .wav and to -data for all other files.
-mode2
If this flag is present, all subsequent tracks are written in CD-ROM mode 2 format. The data size is a multiple of 2336 bytes.
-xa
If this flag is present, all subsequent tracks are written in CD-ROM XA mode 2 form 1 format. The data size is a multiple of 2048 bytes. The XA sector sub headers will be created by the drive. With this option, the write mode is the same as with the -multi option.
-xa1
If this flag is present, all subsequent tracks are written in CD-ROM XA mode 2 form 1 format. The data size is a multiple of 2056 bytes. The XA sector sub headers are part of the user data and have to be supplied by the application that prepares the data to be written.
-xa2
If this flag is present, all subsequent tracks are written in CD-ROM XA mode 2 form 2 format. The data is a multiple of 2324 bytes. The XA sector sub headers will be created by the drive.
-xamix
If this flag is present, all subsequent tracks are written in a way that allows a mix of CD-ROM XA mode 2 form 1/2 format. The data size is a multiple of 2332 bytes. The XA sector sub headers are part of the user data and have to be supplied by the application that prepares the data to be written. The CRC and the P/Q parity ECC/EDC information (depending on the sector type) have to be supplied by the application that prepares the data to be written.
-cdi
If this flag is present, the TOC type for the disk is set to CDI. This only makes sense with XA disks.
-isosize
Use the ISO-9660 file system size as the size of the next track. This option is needed if you want cdrecord to directly read the image of a track from a raw disk partition or from a TAO master CD. In the first case the option -isosize is needed to limit the size of the CD to the size of the ISO filesystem. In the second case the option -isosize is needed to prevent cdrecord from reading the two run out blocks that are appended by each CD-recorder in track at once mode. These two run out blocks cannot be read and would cause a buffer underrun that would cause a defective copy. Do not use this option on files created by mkisofs and in case cdrecord reads the track data from stdin. In the first case, you would prevent cdrecord from writing the amount of padding that has been appended by mkisofs and in the latter case, it will not work because stdin is not seekable.

If -isosize is used for a track, cdrecord will automatically add padding for this track as if the -pad option has been used but the amount of padding may be less than the padding written by mkisofs. Note that if you use -isosize on a track that contains Sparc boot information, the boot information will be lost.

Note also that this option cannot be used to determine the size of a file system if the multi session option is present.

-pad
If the track is a data track, 15 sectors of zeroed data will be added to the end of this and each subsequent data track. In this case, the -pad option is superseded by the padsize= option. It will remain however as a shorthand for padsize=15s. If the -pad option refers to an audio track, cdrecord will pad the audio data to be a multiple of 2352 bytes. The audio data padding is done with binary zeroes which is equal to absolute silence.

-pad remains valid until disabled by -nopad.

padsize=#
Set the amount of data to be appended as padding to the next track to #. Opposed to the behavior of the -pad option, the value for padsize= is reset to zero for each new track. Cdrecord assumes a sector size of 2048 bytes for the padsize= option, independent from the real sector size and independent from the write mode. The megabytes mentioned in the verbose mode output however are counting the output sector size which is e.g. 2448 bytes when writing in RAW/RAW96 mode. See fs= option for possible arguments. To pad the equivalent of 20 minutes on a CD, you may write padsize=20x60x75s. Use this option if your CD-drive is not able to read the last sectors of a track or if you want to be able to read the CD on a Linux system with the ISO-9660 filesystem read ahead bug. If an empty file is used for track data, this option may be used to create a disk that is entirely made of padding. This may e.g. be used to find out how much overburning is possible with a specific media.
-nopad
Do not pad the following tracks - the default.
-shorttrack
Allow all subsequent tracks to violate the Red Book track length standard which requires a minimum track length of 4 seconds. This option is only useful when used in SAO or RAW mode. Not all drives support this feature. The drive must accept the resulting CUE sheet or support RAW writing.
-noshorttrack
Re-enforce the Red Book track length standard. Tracks must be at least 4 seconds.
pregap=#
Set the pre-gap size for the next track. This option currently only makes sense with the TEAC drive when creating track-at-once disks without the 2 second silence before each track.
This option may go away in future.
-preemp
If this flag is present, all TOC entries for subsequent audio tracks will indicate that the audio data has been sampled with 50/15 microsec pre-emphasis. The data, however is not modified during the process of transferring from file to disk. This option has no effect on data tracks.
-nopreemp
If this flag is present, all TOC entries for subsequent audio tracks will indicate that the audio data has been mastered with linear data - this is the default.
-copy
If this flag is present, all TOC entries for subsequent audio tracks of the resulting CD will indicate that the audio data has permission to be copied without limit. This option has no effect on data tracks.
-nocopy
If this flag is present, all TOC entries for subsequent audio tracks of the resulting CD will indicate that the audio data has permission to be copied only once for personal use - this is the default.
-scms
If this flag is present, all TOC entries for subsequent audio tracks of the resulting CD will indicate that the audio data has no permission to be copied anymore.
tsize=#
If the master image for the next track has been stored on a raw disk, use this option to specify the valid amount of data on this disk. If the image of the next track is stored in a regular file, the size of that file is taken to determine the length of this track. If the track contains an ISO 9660 filesystem image use the -isosize option to determine the length of that filesystem image.
In Disk at Once mode and with some drives that use the TEAC programming interface, even in Track at Once mode, cdrecord needs to know the size of each track before starting to write the disk. Cdrecord now checks this and aborts before starting to write. If this happens you will need to run mkisofs -print-size before and use the output (with `s' appended) as an argument to the tsize= option of cdrecord (e.g. tsize=250000s).
See fs= option for possible arguments.

EXAMPLES

For all examples below, it will be assumed that the CD/DVD-Recorder is connected to the primary SCSI bus of the machine. The SCSI target id is set to 2.

To record a pure CD-ROM at double speed, using data from the file cdimage.raw:

cdrecord -v speed=2 dev=2,0 cdimage.raw

To create an image for a ISO 9660 filesystem with Rock Ridge extensions:

mkisofs -R -o cdimage.raw /home/joerg/master/tree

To check the resulting file before writing to CD on Solaris:

mount -r -F fbk -o type=hsfs /dev/fbk0:cdimage.raw /mnt

On Linux:

mount cdimage.raw -r -t iso9660 -o loop /mnt

Go on with:

ls -lR /mnt

umount /mnt

If the overall speed of the system is sufficient and the structure of the filesystem is not too complex, cdrecord will run without creating an image of the ISO 9660 filesystem. Simply run the pipeline:

mkisofs -R /master/tree | cdrecord -v fs=6m speed=2 dev=2,0 -

The recommended minimum FIFO size for running this pipeline is 4 MBytes. As the default FIFO size is 4 MB, the fs= option needs only be present if you want to use a different FIFO size. If your system is loaded, you should run mkisofs in the real time class too. To raise the priority of mkisofs replace the command

mkisofs -R /master/tree
by

priocntl -e -c RT -p 59 mkisofs -R /master/tree

on Solaris and by

nice --18 mkisofs -R /master/tree

on systems that don't have UNIX International compliant real-time scheduling.

Cdrecord runs at priority 59 on Solaris, you should run mkisofs at no more than priority 58. On other systems, you should run mkisofs at no less than nice --18.

Creating a CD-ROM without file system image on disk has been tested on a Sparcstation-2 with a Yamaha CDR-400. It did work up to quad speed when the machine was not loaded. A faster machine may be able to handle quad speed also in the loaded case.

To record a pure CD-DA (audio) at single speed, with each track contained in a file named track01.cdaudio, track02.cdaudio, etc:

cdrecord -v speed=1 dev=2,0 -audio track*.cdaudio

To check if it will be ok to use double speed for the example above. Use the dummy write option:

cdrecord -v -dummy speed=2 dev=2,0 -audio track*.cdaudio

To record a mixed-mode CD with an ISO 9660 filesystem from cdimage.raw on the first track, the other tracks being audio tracks from the files track01.cdaudio, track02.cdaudio, etc:

cdrecord -v dev=2,0 cdimage.raw -audio track*.cdaudio

To handle drives that need to know the size of a track before starting to write, first run

mkisofs -R -q -print-size /master/tree

and then run

mkisofs -R /master/tree | cdrecord speed=2 dev=2,0 tsize=XXXs -

where XXX is replaced by the output of the previous run of mkisofs.

To copy an audio CD in the most accurate way, first run

cdda2wav dev=2,0 -vall cddb=0 -B -Owav

and then run

cdrecord dev=2,0 -v -dao -useinfo -text *.wav

This will try to copy track indices and to read CD-Text information from disk. If there is no CD-Text information, cdda2wav will try to get the information from freedb.org instead.

To copy an audio CD from a pipe (without intermediate files), first run

cdda2wav dev=1,0 -vall cddb=0 -info-only

and then run

cdda2wav dev=1,0 -no-infofile -B -Oraw - | \

cdrecord dev=2,0 -v -dao -audio -useinfo -text *.inf

This will get all information (including track size info) from the *.inf files and then read the audio data from stdin.

If you like to write from stdin, make sure that cdrecord is called with a large enough FIFO size (e.g. fs=128m), reduce the write speed to a value below the read speed of the source drive (e.g. speed=12), and switch the burn-free option for the recording drive on by adding driveropts=burnfree.

To set drive options without writing a CD (e.g. to switch a drive to single session mode), run

cdrecord dev=1,0 -setdropts driveropts=singlesession

If you like to do this when no CD is in the drive, call

cdrecord dev=1,0 -force -setdropts driveropts=singlesession

To copy a CD in clone mode, first read the master CD using:

readcd dev=b,t,l -clone f=somefile

or (in case the CD contains many sectors that are unreadable by intention) by calling:

readcd dev=1,0 -clone -nocorr f=somefile

will create the files somefile and somefile.toc. Then write the CD using:

cdrecord dev=1,0 -raw96r -clone -v somefile

ENVIRONMENT

CDR_DEVICE
This may either hold a device identifier that is suitable to the open call of the SCSI transport library or a label in the file /etc/default/cdrecord.
CDR_SPEED
Sets the default speed value for writing (see also -speed option).
CDR_FIFOSIZE
Sets the default size of the FIFO (see also fs=# option).
CDR_FORCERAWSPEED
If this environment variable is set, cdrecord will allow you to write at the full RAW encoding speed a single CPU supports. This will create high potential of buffer underruns. Use with care.
RSH
If the RSH environment is present, the remote connection will not be created via rcmd(3) but by calling the program pointed to by RSH. Use e.g. RSH=/usr/bin/ssh to create a secure shell connection.

Note that this forces cdrecord to create a pipe to the rsh(1) program and disallows cdrecord to directly access the network socket to the remote server. This makes it impossible to set up performance parameters and slows down the connection compared to a root initiated rcmd(3) connection.

RSCSI
If the RSCSI environment is present, the remote SCSI server will not be the program /opt/schily/sbin/rscsi but the program pointed to by RSCSI. Note that the remote SCSI server program name will be ignored if you log in using an account that has been created with a remote SCSI server program as login shell.

FILES

/etc/default/cdrecord
Default values can be set for the following options in /etc/default/cdrecord. For example: CDR_FIFOSIZE=8m or CDR_SPEED=2
CDR_DEVICE
This may either hold a device identifier that is suitable to the open call of the SCSI transport library or a label in the file /etc/default/cdrecord that allows to identify a specific drive on the system.
CDR_SPEED
Sets the default speed value for writing (see also -speed option).
CDR_FIFOSIZE
Sets the default size of the FIFO (see also fs=# option).
Any other label
is an identifier for a specific drive on the system. Such an identifier may not contain the characters ',', '/', '@' or ':'.

Each line that follows a label contains a TAB separated list of items. Currently, four items are recognized: the SCSI ID of the drive, the default speed that should be used for this drive, the default FIFO size that should be used for this drive and drive specific options. The values for speed and fifosize may be set to -1 to tell cdrecord to use the global defaults. The value for driveropts may be set to "" if no driveropts are used. A typical line may look this way:

teac1= 0,5,0   4       8m      ""

yamaha= 1,6,0  -1      -1      burnfree

This tells cdrecord that a drive named teac1 is at scsibus 0, target 5, lun 0 and should be used with speed 4 and a FIFO size of 8 MB. A second drive may be found at scsibus 1, target 6, lun 0 and uses the default speed and the default FIFO size.

SEE ALSO

cdda2wav(1), readcd(1), scg(7), fbk(7), mkisofs(8), rcmd(3), ssh(1).

NOTES

Not all options described in this manual may be supported by the GPL variant of cdrecord. Cdrecord issues a warning if an attempt is made to use an option that has been disabled in the GPL variant.

On Solaris you need to stop the volume management if you like to use the USCSI fallback SCSI transport code. Even things like cdrecord -scanbus will not work if the volume management is running.

Disks made in Track At Once mode are not suitable as a master for direct mass production by CD manufacturers. You will need the disk at once option to record such disks. Nevertheless the disks made in Track At Once will normally be read in all CD players. Some old audio CD players however may produce a two second click between two audio tracks.

The minimal size of a track is 4 seconds or 300 sectors. If you write smaller tracks, the CD-Recorder will add dummy blocks. This is not an error, even though the SCSI-error message looks this way.

Cdrecord has been tested on an upgraded Philips CDD-521 recorder at single and double speed on a SparcStation 20/502 with no problems, slower computer systems should work also. The newer Philips/HP/Plasmon/Grundig drives as well as Yamaha CDR-100 and CDR-102 work also. The Plasmon RF-4100 work, but has not tested in multi session. A Philips CDD-521 that has not been upgraded will not work. The Sony CDU-924 has been tested, but does not support XA-mode2 in hardware. The Sony therefore cannot create conforming multi session disks. The Ricoh RO-1420C works, but some people seem to have problems to use them with speed=2, try speed=0 in this case.

The Yamaha CDR-400 and all new SCSI-3/mmc conforming drives are supported in single and multi-session.

You should run several tests in all supported speeds of your drive with the -dummy option turned on if you are using cdrecord on an unknown system. Writing a CD is a real-time process. NFS will not always deliver constantly the needed data rates. If you want to use cdrecord with CD-images that are located on a NFS mounted filesystem, be sure that the FIFO size is big enough. I used cdrecord with medium load on a SS20/502 and even at quad speed on a Sparcstation-2 which was heavily loaded, but it is recommended to leave the system as lightly loaded as possible while writing a CD. If you want to make sure that buffer underruns are not caused by your source disk, you may use the command

cdrecord -dummy dev=2,0 padsize=600m /dev/null

to create a disk that is entirely made of dummy data. Cdrecord needs to run as root to get access to the /dev/scg? device nodes and to be able to lock itself into memory.

If you don't want to allow users to become root on your system, cdrecord may safely be installed suid root. This allows all users or a group of users with no root privileges to use cdrecord. Cdrecord in this case checks, if the real user would have been able to read the specified files. To give all user access to use cdrecord, enter:

       chown root /usr/local/bin/cdrecord

       chmod 4711 /usr/local/bin/cdrecord

To give a restricted group of users access to cdrecord enter:

       chown root /usr/local/bin/cdrecord

       chgrp cdburners /usr/local/bin/cdrecord

       chmod 4710 /usr/local/bin/cdrecord

and add a group cdburners on your system.

Never give write permissions for non root users to the /dev/scg? devices unless you would allow anybody to read/write/format all your disks.

You should not connect old drives that do not support disconnect/reconnect to either the SCSI bus that is connected to the CD-Recorder or the source disk.

A Compact Disc can have no more than 99 tracks.

When creating a disc with both audio and data tracks, the data should be on track 1 otherwise you should create a CDplus disk which is a multi session disk with the first session containing the audio tracks and the following session containing the data track.

Many operating systems are not able to read more than a single data track, or need special software to do so.

More information on the SCSI command set of a HP CD-Recorder can be found at:

        http://www.hp.com/isgsupport/cdr/index.html

If you have more information or SCSI command manuals for currently unsupported CD/DVD-Recorders please contact the author.

The Philips CDD 521 CD-Recorder (even in the upgraded version) has several firmware bugs. Some of them will force you to power cycle the device or to reboot the machine.

When using cdrecord with the broken Linux SCSI generic driver. You should note that cdrecord uses a hack, that tries to emulate the functionality of the scg driver. Unfortunately, the sg driver on Linux has several severe bugs:

*
It cannot see if a SCSI command could not be sent at all.
*
It cannot get the SCSI status byte. Cdrecord for that reason cannot report failing SCSI commands in some situations.
*
It cannot get real DMA count of transfer. Cdrecord cannot tell you if there is an DMA residual count.
*
It cannot get number of bytes valid in auto sense data. Cdrecord cannot tell you if device transfers no sense data at all.
*
It fetches to few data in auto request sense (CCS/SCSI-2/SCSI-3 needs >= 18).

The FIFO percent output is computed just after a block of data has been written to the CD/DVD-Recorder. For this reason, there will never be 100% FIFO fill ratio while the FIFO is in streaming mode.

DIAGNOSTICS

You have 9 seconds to type ^C to abort cdrecord after you see the message:

Starting to write CD at speed %d in %s mode for %s session.

A typical error message for a SCSI command looks like:

cdrecord: I/O error. test unit ready: scsi sendcmd: no error
CDB:  00 20 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.002s timeout 40s

The first line gives information about the transport of the command. The text after the first colon gives the error text for the system call from the view of the kernel. It usually is: I/O error unless other problems happen. The next words contain a short description for the SCSI command that fails. The rest of the line tells you if there were any problems for the transport of the command over the SCSI bus. fatal error means that it was not possible to transport the command (i.e. no device present at the requested SCSI address).

The second line prints the SCSI command descriptor block for the failed command.

The third line gives information on the SCSI status code returned by the command, if the transport of the command succeeds. This is error information from the SCSI device.

The fourth line is a hex dump of the auto request sense information for the command.

The fifth line is the error text for the sense key if available, followed by the segment number that is only valid if the command was a copy command. If the error message is not directly related to the current command, the text deferred error is appended.

The sixth line is the error text for the sense code and the sense qualifier if available. If the type of the device is known, the sense data is decoded from tables in scsierrs.c . The text is followed by the error value for a field replaceable unit.

The seventh line prints the block number that is related to the failed command and text for several error flags. The block number may not be valid.

The eight line reports the timeout set up for this command and the time that the command really needed to complete.

The following message is not an error:

Track 01: Total bytes read/written: 2048/2048 (1 sectors).
cdrecord: I/O error. flush cache: scsi sendcmd: no error
CDB:  35 00 00 00 00 00 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: F0 00 05 80 00 00 27 0A 00 00 00 00 B5 00 00 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0xB5 Qual 0x00 (dummy data blocks added) Fru 0x0
Sense flags: Blk -2147483609 (valid)
cmd finished after 0.002s timeout 40s

It simply notifies, that a track that is smaller than the minimum size has been expanded to 300 sectors.

BUGS

Cdrecord has even more options than ls.

There should be a recover option to make disks usable, that have been written during a power failure.

CREDITS

Bill Swartz    (Bill_Swartz@twolf.com)

For helping me with the TEAC driver support
Aaron Newsome   (aaron.d.newsome@wdc.com)

For letting me develop Sony support on his drive
Eric Youngdale  (eric@andante.jic.com)

For supplying mkisofs
Gadi Oxman      (gadio@netvision.net.il)

For tips on the ATAPI standard
Finn Arne Gangstad      (finnag@guardian.no)

For the first FIFO implementation.
Dave Platt      (dplatt@feghoot.ml.org)

For creating the experimental packet writing support,
the first implementation of CD-RW blanking support, the first .wav file decoder and many nice discussions on cdrecord.
Chris P. Ross (cross@eng.us.uu.net)

For the first implementation of a BSDI SCSI transport.
Grant R. Guenther (grant@torque.net)

For creating the first parallel port transport implementation for Linux.
Kenneth D. Merry (ken@kdm.org)

for providing the CAM port for FreeBSD together with Michael Smith (msmith@freebsd.org)
Heiko Eiszfeldt (heiko@hexco.de)
for making libedc_ecc available (needed to write RAW data sectors).

MAILING LISTS

If you want to actively take part on the development of cdrecord, you may join the developer mailing list via this URL:

http://lists.berlios.de/mailman/listinfo/cdrecord-developers

The mail address of the list is: cdwrite@other.debian.org

AUTHOR

Joerg Schilling
Seestr. 110
D-13353 Berlin
Germany

Additional information can be found on:
http://www.fokus.fhg.de/usr/schilling/cdrecord.html

If you have support questions, send them to:

cdrecord-support@berlios.de
or cdwrite@other.debian.org

If you have definitely found a bug, send a mail to:

cdrecord-developers@berlios.de
or schilling@fokus.fhg.de

To subscribe, use:

http://lists.berlios.de/mailman/listinfo/cdrecord-developers
or http://lists.berlios.de/mailman/listinfo/cdrecord-support

The old cdwrite mailing list may be joined by sending mail to:

        cdwrite-request@other.debian.org
and including the word subscribe in the body. The mail address of the list is:

        cdwrite@other.debian.org

Index

NAME
SYNOPSIS
DESCRIPTION
GENERAL OPTIONS
TRACK OPTIONS
EXAMPLES
ENVIRONMENT
FILES
SEE ALSO
NOTES
DIAGNOSTICS
BUGS
CREDITS
MAILING LISTS
AUTHOR
This document was created by man2html, using the manual pages.
Time: GMT, June 24, 2004


Manpage of MKISOFS

MKISOFS

Section: Maintenance Commands (8)
Updated: 14 Feb 2003
Index Return to Main Contents

NAME

mkisofs - create an hybrid ISO9660/JOLIET/HFS filesystem with optional Rock Ridge attributes.

SYNOPSIS

mkisofs [ options ] [ -o filename ] pathspec [pathspec ...]

DESCRIPTION

mkisofs is effectively a pre-mastering program to generate an ISO9660/JOLIET/HFS hybrid filesystem.

mkisofs is capable of generating the System Use Sharing Protocol records (SUSP) specified by the Rock Ridge Interchange Protocol. This is used to further describe the files in the iso9660 filesystem to a unix host, and provides information such as longer filenames, uid/gid, posix permissions, symbolic links, block and character devices.

If Joliet or HFS hybrid command line options are specified, mkisofs will create additional filesystem meta data for Joliet or HFS. The file content in this case refers to the same data blocks on the media. It will generate a pure ISO9660 filesystem unless the Joliet or HFS hybrid command line options are given.

mkisofs can generate a true (or shared) HFS hybrid filesystem. The same files are seen as HFS files when accessed from a Macintosh and as ISO9660 files when accessed from other machines. HFS stands for Hierarchical File System and is the native file system used on Macintosh computers.

As an alternative, mkisofs can generate the Apple Extensions to ISO9660 for each file. These extensions provide each file with CREATOR, TYPE and certain Finder Flags when accessed from a Macintosh. See the HFS MACINTOSH FILE FORMATS section below.

mkisofs takes a snapshot of a given directory tree, and generates a binary image which will correspond to an ISO9660 or HFS filesystem when written to a block device.

Each file written to the iso9660 filesystem must have a filename in the 8.3 format (8 characters, period, 3 characters, all upper case), even if Rock Ridge is in use. This filename is used on systems that are not able to make use of the Rock Ridge extensions (such as MS-DOS), and each filename in each directory must be different from the other filenames in the same directory. mkisofs generally tries to form correct names by forcing the unix filename to upper case and truncating as required, but often times this yields unsatisfactory results when there are cases where the truncated names are not all unique. mkisofs assigns weightings to each filename, and if two names that are otherwise the same are found the name with the lower priority is renamed to have a 3 digit number as an extension (where the number is guaranteed to be unique). An example of this would be the files foo.bar and foo.bar.~1~ - the file foo.bar.~1~ would be written as FOO000.BAR;1 and the file foo.bar would be written as FOO.BAR;1

When used with various HFS options, mkisofs will attempt to recognise files stored in a number of Apple/Unix file formats and will copy the data and resource forks as well as any relevant finder information. See the HFS MACINTOSH FILE FORMATS section below for more about formats mkisofs supports.

Note that mkisofs is not designed to communicate with the writer directly. Most writers have proprietary command sets which vary from one manufacturer to another, and you need a specialized tool to actually burn the disk.

The cdrecord utility is a utility capable of burning an actual disc. The latest version of cdrecord is available from ftp://ftp.berlios.de/pub/cdrecord

Also you should know that most cd writers are very particular about timing. Once you start to burn a disc, you cannot let their buffer empty before you are done, or you will end up with a corrupt disc. Thus it is critical that you be able to maintain an uninterrupted data stream to the writer for the entire time that the disc is being written.

pathspec is the path of the directory tree to be copied into the iso9660 filesystem. Multiple paths can be specified, and mkisofs will merge the files found in all of the specified path components to form the cdrom image.

If the option -graft-points has been specified, it is possible to graft the paths at points other than the root directory, and it is possible to graft files or directories onto the cdrom image with names different than what they have in the source filesystem. This is easiest to illustrate with a couple of examples. Let's start by assuming that a local file ../old.lis exists, and you wish to include it in the cdrom image.

        foo/bar/=../old.lis

will include the file old.lis in the cdrom image at /foo/bar/old.lis, while

        foo/bar/xxx=../old.lis

will include the file old.lis in the cdrom image at /foo/bar/xxx. The same sort of syntax can be used with directories as well. mkisofs will create any directories required such that the graft points exist on the cdrom image - the directories do not need to appear in one of the paths. By default, any directories that are created on the fly like this will have permissions 0555 and appear to be owned by the person running mkisofs. If you wish other permissions or owners of the intermediate directories, see -uid, -gid, -dir-mode, -file-mode and -new-dir-mode.

mkisofs will also run on Win9X/NT4 machines when compiled with Cygnus' cygwin (available from http://sourceware.cygnus.com/cygwin/). Therefore most references in this man page to Unix can be replaced with Win32.

OPTIONS

-abstract FILE
Specifies the abstract file name. There is space on the disc for 37 characters of information. This parameter can also be set in the file .mkisofsrc with ABST=filename. If specified in both places, the command line version is used.
-A application_id
Specifies a text string that will be written into the volume header. This should describe the application that will be on the disc. There is space on the disc for 128 characters of information. This parameter can also be set in the file .mkisofsrc with APPI=id. If specified in both places, the command line version is used.
-allow-leading-dots
-ldots
Allow ISO9660 filenames to begin with a period. Usually, a leading dot is replaced with an underscore in order to maintain MS-DOS compatibility.
This violates the ISO9660 standard, but it happens to work on many systems. Use with caution.
-allow-lowercase
This options allows lower case characters to appear in iso9660 filenames.
This violates the ISO9660 standard, but it happens to work on some systems. Use with caution.
-allow-multidot
This options allows more than one dot to appear in iso9660 filenames. A leading dot is not affected by this option, it may be allowed separately using the -allow-leading-dots option.
This violates the ISO9660 standard, but it happens to work on many systems. Use with caution.
-biblio FILE
Specifies the bibliographic file name. There is space on the disc for 37 characters of information. This parameter can also be set in the file .mkisofsrc with BIBLO=filename. If specified in both places, the command line version is used.
-cache-inodes
Cache inode and device numbers to find hard links to files. If mkisofs finds a hard link (a file with multiple names), then the file will only appear once on the CD. This helps to save space on the CD. The option -cache-inodes is default on UNIX like operating systems. Be careful when using this option on a filesystem without unique inode numbers as it may result in files containing the wrong content on CD.
-no-cache-inodes
Do not cache inode and device numbers. This option is needed whenever a filesystem does not have unique inode numbers. It is the default on Cygwin. As the Microsoft operating system that runs below Cygwin is not POSIX compliant, it does not have unique inode numbers. Cygwin creates fake inode numbers from a hash algorithm that is not 100% correct. If mkisofs would cache inodes on Cygwin, it would believe that some files are identical although they are not. The result in this case are files that contain the wrong content if a significant amount of different files (> ~5000) is in inside the tree that is to be archived. This does not happen when the -no-cache-inodes is used, but the disadvantage is that mkisofs cannot detect hardlinks anymore and the resulting CD image may be larger than expected.
-b eltorito_boot_image
Specifies the path and filename of the boot image to be used when making an "El Torito" bootable CD. The pathname must be relative to the source path specified to mkisofs. This option is required to make an "El Torito" bootable CD. The boot image must be exactly the size of either a 1200, 1440, or a 2880 kB floppy, and mkisofs will use this size when creating the output iso9660 filesystem. It is assumed that the first 512 byte sector should be read from the boot image (it is essentially emulating a normal floppy drive). This will work, for example, if the boot image is a LILO based boot floppy.

If the boot image is not an image of a floppy, you need to add one of the options: -hard-disk-boot or -no-emul-boot. If the system should not boot off the emulated disk, use -no-boot.

If the -sort option has not been specified, the boot images are sorted with low priority (+2) to the beginning of the medium. If you don't like this, you need to specify a sort weight of 0 for the boot images.

-eltorito-alt-boot
Start with a new set of "El Torito" boot parameters. This allows to have more than one El Torito boot on a CD. A maximum of 63 El Torito boot entries may be put on a single CD.
-B img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e
-sparc-boot img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e
Specifies a comma separated list of boot images that are needed to make a bootable CD for sparc systems. Partition 0 is used for the ISO-9660 image, the first image file is mapped to partition 1. There may be empty fields in the comma separated list. The maximum number of possible partitions is 8 so it is impossible to specify more than 7 partition images. This option is required to make a bootable CD for Sun sparc systems. If the -B or -sparc-boot option has been specified, the first sector of the resulting image will contain a Sun disk label. This disk label specifies slice 0 for the iso9660 image and slice 1 ... slice 7 for the boot images that have been specified with this option. Byte offset 512 ... 8191 within each of the additional boot images must contain a primary boot that works for the appropriate sparc architecture. The rest of each of the images usually contains an ufs filesystem that is used primary kernel boot stage.

The implemented boot method is the boot method found with SunOS 4.x and SunOS 5.x. However, it does not depend on SunOS internals but only on properties of the Open Boot prom. For this reason, it should be usable for any OS that boots off a sparc system.

For more information also see the NOTES section below.

If the special filename ... is used, the actual and all following boot partitions are mapped to the previous partition. If mkisofs is called with -G image -B ... all boot partitions are mapped to the partition that contains the iso9660 filesystem image and the generic boot image that is located in the first 16 sectors of the disk is used for all architectures.

-G generic_boot_image
Specifies the path and filename of the generic boot image to be used when making a generic bootable CD. The generic_boot_image will be placed on the first 16 sectors of the CD. The first 16 sectors are the sectors that are located before the iso9660 primary volume descriptor. If this option is used together with the -sparc-boot option, the Sun disk label will overlay the first 512 bytes of the generic boot image.
-hard-disk-boot
Specifies that the boot image used to create "El Torito" bootable CDs is a hard disk image. The hard disk image must begin with a master boot record that contains a single partition.
-no-emul-boot
Specifies that the boot image used to create "El Torito" bootable CDs is a 'no emulation' image. The system will load and execute this image without performing any disk emulation.
-no-boot
Specifies that the created "El Torito" CD should be marked as not bootable. The system will provide an emulated drive for the image, but will boot off a standard boot device.
-boot-load-seg segment_address
Specifies the load segment address of the boot image for no-emulation "El Torito" CDs.
-boot-load-size load_sectors
Specifies the number of "virtual" (512-byte) sectors to load in no-emulation mode. The default is to load the entire boot file. Some BIOSes may have problems if this is not a multiple of 4.
-boot-info-table
Specifies that a 56-byte table with information of the CD-ROM layout will be patched in at offset 8 in the boot file. If this option is given, the boot file is modified in the source filesystem, so make sure to make a copy if this file cannot be easily regenerated! See the EL TORITO BOOT INFO TABLE section for a description of this table.
-C last_sess_start,next_sess_start
This option is needed when mkisofs is used to create a CDextra or the image of a second session or a higher level session for a multi session disk. The option -C takes a pair of two numbers separated by a comma. The first number is the sector number of the first sector in the last session of the disk that should be appended to. The second number is the starting sector number of the new session. The expected pair of numbers may be retrieved by calling cdrecord -msinfo ... If the -C option is used in conjunction with the -M option, mkisofs will create a filesystem image that is intended to be a continuation of the previous session. If the -C option is used without the -M option, mkisofs will create a filesystem image that is intended to be used for a second session on a CDextra. This is a multi session CD that holds audio data in the first session and a ISO9660 filesystem in the second session.
-c boot_catalog
Specifies the path and filename of the boot catalog to be used when making an "El Torito" bootable CD. The pathname must be relative to the source path specified to mkisofs. This option is required to make a bootable CD. This file will be inserted into the output tree and not created in the source filesystem, so be sure the specified filename does not conflict with an existing file, as it will be excluded. Usually a name like "boot.catalog" is chosen.

If the -sort option has not been specified, the boot catalog sorted with low priority (+1) to the beginning of the medium. If you don't like this, you need to specify a sort weight of 0 for the boot catalog.

-check-oldnames
Check all filenames imported from old session for compliance with actual mkisofs iso9660 file naming rules. It his option is not present, only names with a length > 31 are checked as these files are a hard violation of the iso9660 standard.
-check-session FILE
Check all old sessions for compliance with actual mkisofs iso9660 file naming rules. This is a high level option that is a combination of the options: -M FILE -C 0,0 -check-oldnames For the parameter FILE see description of -M option.
-copyright FILE
Specifies the Copyright file name. There is space on the disc for 37 characters of information. This parameter can also be set in the file .mkisofsrc with COPY=filename. If specified in both places, the command line version is used.
-d
Omit trailing period from files that do not have a period.
This violates the ISO9660 standard, but it happens to work on many systems. Use with caution.
-D
Do not use deep directory relocation, and instead just pack them in the way we see them.
This violates the ISO9660 standard, but it happens to work on many systems. Use with caution.
-dir-mode mode
Overrides the mode of directories used to create the image to mode. Specifying this option automatically enables Rock Ridge extensions.
-dvd-video
Generate DVD-Video compliant UDF file system. This is done by sorting the order of the content of the appropriate files and by adding padding between the files if needed. Note that the sorting only works if the DVD-Video filenames include upper case characters only.
-f
Follow symbolic links when generating the filesystem. When this option is not in use, symbolic links will be entered using Rock Ridge if enabled, otherwise the file will be ignored.
-file-mode mode
Overrides the mode of regular files used to create the image to mode. Specifying this option automatically enables Rock Ridge extensions.
-gid gid
Overrides the gid read from the source files to the value of gid. Specifying this option automatically enables Rock Ridge extensions.
-gui
Switch the behaviour for a GUI. This currently makes the output more verbose but may have other effects in future.
-graft-points
Allow to use graft points for filenames. If this option is used, all filenames are checked for graft points. The filename is divided at the first unescaped equal sign. All occurrences of '\\' and '=' characters must be escaped with '\\' if -graft-points has been specified.
-hide glob
Hide glob from being seen on the ISO9660 or Rock Ridge directory. glob is a shell wild-card-style pattern that must match any part of the filename or path. Multiple globs may be hidden. If glob matches a directory, then the contents of that directory will be hidden. In order to match a directory name, make sure the pathname does not include a trailing '/' character. All the hidden files will still be written to the output CD image file. Should be used with the -hide-joliet option. See README.hide for more details.
-hide-list file
A file containing a list of globs to be hidden as above.
-hidden glob
Add the hidden (existence) ISO9660 directory attribute for glob. This attribute will prevent glob from being listed on DOS based systems if the /A flag is not used for the listing. glob is a shell wild-card-style pattern that must match any part of the filename or path. In order to match a directory name, make sure the pathname does not include a trailing '/' character. Multiple globs may be hidden.
-hidden-list file
A file containing a list of globs to get the hidden attribute as above.
-hide-joliet glob
Hide glob from being seen on the Joliet directory. glob is a shell wild-card-style pattern that must match any part of the filename or path. Multiple globs may be hidden. If glob matches a directory, then the contents of that directory will be hidden. In order to match a directory name, make sure the pathname does not include a trailing '/' character. All the hidden files will still be written to the output CD image file. Should be used with the -hide option. See README.hide for more details.
-hide-joliet-list file
A file containing a list of globs to be hidden as above.
-hide-joliet-trans-tbl
Hide the TRANS.TBL files from the Joliet tree. These files usually don't make sense in the Joliet World as they list the real name and the ISO9660 name which may both be different from the Joliet name.
-hide-rr-moved
Rename the directory RR_MOVED to .rr_moved in the Rock Ridge tree. It seems to be impossible to completely hide the RR_MOVED directory from the Rock Ridge tree. This option only makes the visible tree better to understand for people who don't know what this directory is for. If you need to have no RR_MOVED directory at all, you should use the -D option. Note that in case that the -D option has been specified, the resulting filesystem is not ISO9660 level-1 compliant and will not be readable on MS-DOS. See also NOTES section for more information on the RR_MOVED directory.
-input-charset charset
Input charset that defines the characters used in local file names. To get a list of valid charset names, call mkisofs -input-charset help. To get a 1:1 mapping, you may use default as charset name. The default initial values are cp437 on DOS based systems and iso8859-1 on all other systems. See CHARACTER SETS section below for more details.
-output-charset charset
Output charset that defines the characters that will be used in Rock Ridge file names. Defaults to the input charset. See CHARACTER SETS section below for more details.
-iso-level level
Set the iso9660 conformance level. Valid numbers are 1..3 and 4.

With level 1, files may only consist of one section and filenames are restricted to 8.3 characters.

With level 2, files may only consist of one section.

With level 3, no restrictions (other than ISO-9660:1988) do apply.

With all iso9660 levels from 1..3, all filenames are restricted to upper case letters, numbers and the underscore (_). The maximum filename length is restricted to 31 characters, the directory nesting level is restricted to 8 and the maximum path length is limited to 255 characters.

Level 4 officially does not exists but mkisofs maps it to ISO-9690:1999 which is ISO-9690 version 2.

With level 4, an enhanced volume descriptor with version number and file structure version number set to 2 is emitted. There may be more than 8 levels of directory nesting, there is no need for a file to contain a dot and the dot has no more special meaning, file names do not have version numbers, the maximum length for files and directory is raised to 207. If Rock Ridge is used, the maximum ISO-9660 name length is reduced to 197.

When creating Version 2 images, mkisofs emits an enhanced volume descriptor which looks similar to a primary volume descriptor but is slightly different. Be careful not to use broken software to make ISO-9660 images bootable by assuming a second PVD copy and patching this putative PVD copy into an El Torito VD.

-J
Generate Joliet directory records in addition to regular iso9660 file names. This is primarily useful when the discs are to be used on Windows-NT or Windows-95 machines. The Joliet filenames are specified in Unicode and each path component can be up to 64 Unicode characters long. Note that Joliet is no standard - CD's that use only Joliet extensions but no standard Rock Ridge extensions may usually only be used on Microsoft Win32 systems. Furthermore, the fact that the filenames are limited to 64 characters and the fact that Joliet uses the UTF-16 coding for Unicode characters causes interoperability problems.
-joliet-long
Allow Joliet filenames to be up to 103 Unicode characters. This breaks the Joliet specification - but appears to work. Use with caution. The number 103 is derived from: the maximum Directory Record Length (254), minus the length of Directory Record (33), minus CD-ROM XA System Use Extension Information (14), divided by the UTF-16 character size (2).
-jcharset charset
Same as using -input-charset charset and -J options. See CHARACTER SETS section below for more details.
-l
Allow full 31 character filenames. Normally the ISO9660 filename will be in an 8.3 format which is compatible with MS-DOS, even though the ISO9660 standard allows filenames of up to 31 characters. If you use this option, the disc may be difficult to use on a MS-DOS system, but this comes in handy on some other systems (such as the Amiga). Use with caution.
-L
Outdated option reserved by POSIX.1-2001, use -allow-leading-dots instead. This option will get POSIX.1-2001 semantics with mkisofs-2.02.
-log-file log_file
Redirect all error, warning and informational messages to log_file instead of the standard error.
-m glob
Exclude glob from being written to CDROM. glob is a shell wild-card-style pattern that must match part of the filename (not the path as with option -x). Technically glob is matched against the d->d_name part of the directory entry. Multiple globs may be excluded. Example:

mkisofs -o rom -m '*.o' -m core -m foobar

would exclude all files ending in ".o", called "core" or "foobar" to be copied to CDROM. Note that if you had a directory called "foobar" it too (and of course all its descendants) would be excluded.

NOTE: The -m and -x option description should both be updated, they are wrong. Both now work identical and use filename globbing. A file is excluded if either the last component matches or the whole path matches.

-exclude-list file
A file containing a list of globs to be exclude as above.
-max-iso9660-filenames
Allow 37 chars in iso9660 filenames. This option forces the -N option as the extra name space is taken from the space reserved for ISO-9660 version numbers.
This violates the ISO9660 standard, but it happens to work on many systems. Although a conforming application needs to provide a buffer space of at least 37 characters, disks created with this option may cause a buffer overflow in the reading operating system. Use with extreme care.
-M path
or
-M device
or
-dev device
Specifies path to existing iso9660 image to be merged. The alternate form takes a SCSI device specifier that uses the same syntax as the dev= parameter of cdrecord. The output of mkisofs will be a new session which should get written to the end of the image specified in -M. Typically this requires multi-session capability for the recorder and cdrom drive that you are attempting to write this image to. This option may only be used in conjunction with the -C option.
-N
Omit version numbers from ISO9660 file names.
This violates the ISO9660 standard, but no one really uses the version numbers anyway. Use with caution.
-new-dir-mode mode
Mode to use when creating new directories in the iso fs image. The default mode is 0555.
-nobak
-no-bak
Do not include backup files files on the iso9660 filesystem. If the -no-bak option is specified, files that contain the characters '~' or '#' or end in '.bak' will not be included (these are typically backup files for editors under unix).
-force-rr
Do not use the automatic Rock Ridge attributes recognition for previous sessions. This helps to show rotten iso9660 extension records as e.g. created by NERO burning ROM.
-no-rr
Do not use the Rock Ridge attributes from previous sessions. This may help to avoid getting into trouble when mkisofs finds illegal Rock Ridge signatures on an old session.
-no-split-symlink-components
Don't split the SL components, but begin a new Continuation Area (CE) instead. This may waste some space, but the SunOS 4.1.4 cdrom driver has a bug in reading split SL components (link_size = component_size instead of link_size += component_size).
-no-split-symlink-fields
Don't split the SL fields, but begin a new Continuation Area (CE) instead. This may waste some space, but the SunOS 4.1.4 and Solaris 2.5.1 cdrom driver have a bug in reading split SL fields (a `/' can be dropped).
-o filename
is the name of the file to which the iso9660 filesystem image should be written. This can be a disk file, a tape drive, or it can correspond directly to the device name of the optical disc writer. If not specified, stdout is used. Note that the output can also be a block special device for a regular disk drive, in which case the disk partition can be mounted and examined to ensure that the premastering was done correctly.
-pad
Pad the end of the whole image by 150 sectors (300 kB). If the option -B is used, then there is a padding at the end of the iso9660 partition and before the beginning of the boot partitions. The size of this padding is chosen to make the first boot partition start on a sector number that is a multiple of 16.

The padding is needed as many operating systems (e.g. Linux) implement read ahead bugs in their filesystem I/O. These bugs result in read errors on one or more files that are located at the end of a track. They are usually present when the CD is written in Track at Once mode or when the disk is written as mixed mode CD where an audio track follows the data track.

To avoid problems with I/O error on the last file on the filesystem, the -pad option has been made the default.

-no-pad
Do not Pad the end by 150 sectors (300 kB) and do not make the the boot partitions start on a multiple of 16 sectors.
-path-list file
A file containing a list of pathspec directories and filenames to be added to the ISO9660 filesystem. This list of pathspecs are processed after any that appear on the command line. If the argument is -, then the list is read from the standard input.
-P
Outdated option reserved by POSIX.1-2001, use -publisher instead. This option will get POSIX.1-2001 semantics with mkisofs-2.02.
-publisher publisher_id
Specifies a text string that will be written into the volume header. This should describe the publisher of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 characters of information. This parameter can also be set in the file .mkisofsrc with PUBL=. If specified in both places, the command line version is used.
-p preparer_id
Specifies a text string that will be written into the volume header. This should describe the preparer of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 characters of information. This parameter can also be set in the file .mkisofsrc with PREP=. If specified in both places, the command line version is used.
-print-size
Print estimated filesystem size in multiples of the sector size (2048 bytes) and exit. This option is needed for Disk At Once mode and with some CD-R drives when piping directly into cdrecord. In this case it is needed to know the size of the filesystem before the actual CD-creation is done. The option -print-size allows to get this size from a "dry-run" before the CD is actually written. Old versions of mkisofs did write this information (among other information) to stderr. As this turns out to be hard to parse, the number without any other information is now printed on stdout too. If you like to write a simple shell script, redirect stderr and catch the number from stdout. This may be done with:

cdblocks=` mkisofs -print-size -quiet ... `

mkisofs ... | cdrecord ... tsize=${cdblocks}s -

-quiet
This makes mkisofs even less verbose. No progress output will be provided.
-R
Generate SUSP and RR records using the Rock Ridge protocol to further describe the files on the iso9660 filesystem.
-r
This is like the -R option, but file ownership and modes are set to more useful values. The uid and gid are set to zero, because they are usually only useful on the author's system, and not useful to the client. All the file read bits are set true, so that files and directories are globally readable on the client. If any execute bit is set for a file, set all of the execute bits, so that executables are globally executable on the client. If any search bit is set for a directory, set all of the search bits, so that directories are globally searchable on the client. All write bits are cleared, because the CD-Rom will be mounted read-only in any case. If any of the special mode bits are set, clear them, because file locks are not useful on a read-only file system, and set-id bits are not desirable for uid 0 or gid 0. When used on Win32, the execute bit is set on all files. This is a result of the lack of file permissions on Win32 and the Cygwin POSIX emulation layer. See also -uid -gid, -dir-mode, -file-mode and -new-dir-mode.
-relaxed-filenames
The option -relaxed-filenames allows ISO9660 filenames to include digits, upper case characters and all other 7 bit ASCII characters (resp. anything except lowercase characters).
This violates the ISO9660 standard, but it happens to work on many systems. Use with caution.
-root dir
Moves all files and directories into dir in the image. This is essentially the same as using -graft-points and adding dir in front of every pathspec, but is easier to use.

dir may actually be several levels deep. It is created with the same permissions as other graft points.

-old-root dir
This option is necessary when writing a multisession image and the previous (or even older) session was written with -root dir. Using a directory name not found in the previous session causes mkisofs to abort with an error.

Without this option, mkisofs would not be able to find unmodified files and would be forced to write their data into the image once more.

-root and -old-root are meant to be used together to do incremental backups. The initial session would e.g. use: mkisofs -root backup_1 dirs. The next incremental backup with mkisofs -root backup_2 -old-root backup_1 dirs. would take another snapshot of these directories. The first snapshot would be found in backup_1, the second one in backup_2, but only modified or new files need to be written into the second session.

Without these options, new files would be added and old ones would be preserved. But old ones would be overwritten if the file was modified. Recovering the files by copying the whole directory back from CD would also restore files that were deleted intentionally. Accessing several older versions of a file requires support by the operating system to choose which sessions are to be mounted.

-sort sort file
Sort file locations on the media. Sorting is controlled by a file that contains pairs of filenames and sorting offset weighting. If the weighting is higher, the file will be located closer to the beginning of the media, if the weighting is lower, the file will be located closer to the end of the media. There must be only one space or tabs character between the filename and the weight and the weight must be the last characters on a line. The filename is taken to include all the characters up to, but not including the last space or tab character on a line. This is to allow for space characters to be in, or at the end of a filename. This option does not sort the order of the file names that appear in the ISO9660 directory. It sorts the order in which the file data is written to the CD image - which may be useful in order to optimize the data layout on a CD. See README.sort for more details.
-sparc-boot img_sun4,img_sun4c,img_sun4m,img_sun4d,img_sun4e
See -B option above.
-sparc-label label
Set the Sun disk label name for the Sun disk label that is created with the -sparc-boot option.
-split-output
Split the output image into several files of approximately 1 GB. This helps to create DVD sized iso9660 images on operating systems without large file support. Cdrecord will concatenate more than one file into a single track if writing to a DVD. To make -split-output work, the -o filename option must be specified. The resulting outout images will be named: filename_00,filename_01,filename_02...
-stream-media-size #
Select streaming operation and set the media size to # sectors. This allows you to pipe the output of the tar program into mkisofs and to create a iso9660 filesystem without the need of an intermediate tar archive file. If this option has been specified, mkisofs reads from stdin and creates a file with the name STREAM.IMG. The maximum size of the file (with padding) is 200 sectors less than the specified media size. If -no-pad has been specified, the file size is 50 sectors less than the specified media size. If the file is smaller, then mkisofs will write padding. This may take a while.

The option -stream-media-size creates simple iso9660 filesystems only and may not used together with multi-session or hybrid filesystem options.

-stream-file-name name
Reserved for future use.
-sunx86-boot UFS-img,,,AUX1-img
Specifies a comma separated list of filesystem images that are needed to make a bootable CD for Solaris x86 systems.

Note that partition 1 is used for the ISO-9660 image and that partition 2 is the whole disk, so partition 1 and 2 may not be used by external partition data. The first image file is mapped to partition 0. There may be empty fields in the comma separated list, and list entries for partition 1 and 2 must be empty. The maximum number of supported partitions is 8 (although the Solaris x86 partition table could support up to 16 partitions), so it is impossible to specify more than 6 partition images. This option is required to make a bootable CD for Solaris x86 systems.

If the -sunx86-boot option has been specified, the first sector of the resulting image will contain a PC fdisk label with a Solaris type 0x82 fdisk partition that starts at offset 512 and spans the whole CD. In addition, for the Solaris type 0x82 fdisk partition, there is a SVr4 disk label at offset 1024 in the first sector of the CD. This disk label specifies slice 0 for the first (usually UFS type) filesystem image that is used to boot the PC and slice 1 for the iso9660 image. Slice 2 spans the whole CD slice 3 ... slice 7 may be used for additional filesystem images that have been specified with this option.

A Solaris x86 boot CD uses a 1024 byte sized primary boot that uses the El-Torito no-emulation boot mode and a secondary generic boot that is in CD sectors 1..15. For this reason, both -b bootimage -no-emul-boot and -G genboot must be specified.

-sunx86-label label
Set the SVr4 disk label name for the SVr4 disk label that is created with the -sunx86-boot option.
-sysid ID
Specifies the system ID. There is space on the disc for 32 characters of information. This parameter can also be set in the file .mkisofsrc with SYSI=system_id. If specified in both places, the command line version is used.
-T
Generate a file TRANS.TBL in each directory on the CDROM, which can be used on non-Rock Ridge capable systems to help establish the correct file names. There is also information present in the file that indicates the major and minor numbers for block and character devices, and each symlink has the name of the link file given.
-table-name TABLE_NAME
Alternative translation table file name (see above). Implies the -T option. If you are creating a multi-session image you must use the same name as in the previous session.
-ucs-level level
Set Unicode conformance level in the Joliet SVD. The default level is 3. It may be set to 1..3 using this option.
-udf
Include UDF support in the generated filesystem image. UDF support is currently in alpha status and for this reason, it is not possible to create UDF only images. UDF data structures are currently coupled to the Joliet structures, so there are many pitfalls with the current implementation. There is no UID/GID support, there is no POSIX permission support, there is no support for symlinks. Note that UDF wastes the space from sector ~20 to sector 256 at the beginning of the disk in addition to the spcae needed for real UDF data structures.
-uid uid
Overrides the uid read from the source files to the value of uid. Specifying this option automatically enables Rock Ridge extensions.
-use-fileversion
The option -use-fileversion allows mkisofs to use file version numbers from the filesystem. If the option is not specified, mkisofs creates a version number of 1 for all files. File versions are strings in the range ;1 to ;32767 This option is the default on VMS.
-U
Allows "Untranslated" filenames, completely violating the iso9660 standards described above. Forces on the -d, -l, -N, -allow-leading-dots, -relaxed-filenames, -allow-lowercase, -allow-multidot and -no-iso-translate flags. It allows more than one '.' character in the filename, as well as mixed case filenames. This is useful on HP-UX system, where the built-in CDFS filesystem does not recognize ANY extensions. Use with extreme caution.
-no-iso-translate
Do not translate the characters '#' and '~' which are invalid for iso9660 filenames. These characters are though invalid often used by Microsoft systems.
This violates the ISO9660 standard, but it happens to work on many systems. Use with caution.
-V volid
Specifies the volume ID (volume name or label) to be written into the master block. There is space on the disc for 32 characters of information. This parameter can also be set in the file .mkisofsrc with VOLI=id. If specified in both places, the command line version is used. Note that if you assign a volume ID, this is the name that will be used as the mount point used by the Solaris volume management system and the name that is assigned to the disc on a Microsoft Win32 or Apple Mac platform.
-volset ID
Specifies the volset ID. There is space on the disc for 128 characters of information. This parameter can also be set in the file .mkisofsrc with VOLS=volset_id. If specified in both places, the command line version is used.
-volset-size #
Sets the volume set size to #. The volume set size is the number of CD's that are in a CD set. The -volset-size option may be used to create CD's that are part of e.g. a Operation System installation set of CD's. The option -volset-size must be specified before -volset-seqno on each command line.
-volset-seqno #
Sets the volume set sequence number to #. The volume set sequence number is the index number of the current CD in a CD set. The option -volset-size must be specified before -volset-seqno on each command line.
-v
Verbose execution. If given twice on the command line, extra debug information will be printed.
-x path
Exclude path from being written to CDROM. path must be the complete pathname that results from concatenating the pathname given as command line argument and the path relative to this directory. Multiple paths may be excluded. Example:

mkisofs -o cd -x /local/dir1 -x /local/dir2 /local

NOTE: The -m and -x option description should both be updated, they are wrong. Both now work identical and use filename globbing. A file is excluded if either the last component matches or the whole path matches.

-z
Generate special RRIP records for transparently compressed files. This is only of use and interest for hosts that support transparent decompression, such as Linux 2.4.14 or later. You must specify the -R or -r options to enable RockRidge, and generate compressed files using the mkzftree utility before running mkisofs. Note that transparent compression is a nonstandard Rock Ridge extension. The resulting disks are only transparently readable if used on Linux. On other operating systems you will need to call mkzftree by hand to decompress the files.

HFS OPTIONS

-hfs
Create an ISO9660/HFS hybrid CD. This option should be used in conjunction with the -map, -magic and/or the various double dash options given below.
-apple
Create an ISO9660 CD with Apple's extensions. Similar to the -hfs option, except that the Apple Extensions to ISO9660 are added instead of creating an HFS hybrid volume. Former mkisofs versions did include Rock Ridge attributes by default if -apple was specified. This versions of mkisofs does not do this anymore. If you like to have Rock Ridge attributes, you need to specify this separately.
-map mapping_file
Use the mapping_file to set the CREATOR and TYPE information for a file based on the filename's extension. A filename is mapped only if it is not one of the know Apple/Unix file formats. See the HFS CREATOR/TYPE section below.
-magic magic_file
The CREATOR and TYPE information is set by using a file's magic number (usually the first few bytes of a file). The magic_file is only used if a file is not one of the known Apple/Unix file formats, or the filename extension has not been mapped using the -map option. See the HFS CREATOR/TYPE section below for more details.
-hfs-creator CREATOR
Set the default CREATOR for all files. Must be exactly 4 characters. See the HFS CREATOR/TYPE section below for more details.
-hfs-type TYPE
Set the default TYPE for all files. Must be exactly 4 characters. See the HFS CREATOR/TYPE section below for more details.
-probe
Search the contents of files for all the known Apple/Unix file formats. See the HFS MACINTOSH FILE FORMATS section below for more about these formats. However, the only way to check for MacBinary and AppleSingle files is to open and read them. Therefore this option may increase processing time. It is better to use one or more double dash options given below if the Apple/Unix formats in use are known.
-no-desktop
Do not create (empty) Desktop files. New HFS Desktop files will be created when the CD is used on a Macintosh (and stored in the System Folder). By default, empty Desktop files are added to the HFS volume.
-mac-name
Use the HFS filename as the starting point for the ISO9660, Joliet and Rock Ridge file names. See the HFS MACINTOSH FILE NAMES section below for more information.
-boot-hfs-file driver_file
Installs the driver_file that may make the CD bootable on a Macintosh. See the HFS BOOT DRIVER section below. (Alpha).
-part
Generate an HFS partition table. By default, no partition table is generated, but some older Macintosh CDROM drivers need an HFS partition table on the CDROM to be able to recognize a hybrid CDROM.
-auto AutoStart_file
Make the HFS CD use the QuickTime 2.0 Autostart feature to launch an application or document. The given filename must be the name of a document or application located at the top level of the CD. The filename must be less than 12 characters. (Alpha).
-cluster-size size
Set the size in bytes of the cluster or allocation units of PC Exchange files. Implies the --exchange option. See the HFS MACINTOSH FILE FORMATS section below.
-hide-hfs glob
Hide glob from the HFS volume. The file or directory will still exist in the ISO9660 and/or Joliet directory. glob is a shell wild-card-style pattern that must match any part of the filename Multiple globs may be excluded. Example:

mkisofs -o rom -hfs -hide-hfs '*.o' -hide-hfs foobar

would exclude all files ending in ".o" or called "foobar" from the HFS volume. Note that if you had a directory called "foobar" it too (and of course all its descendants) would be excluded. The glob can also be a path name relative to the source directories given on the command line. Example:

mkisofs -o rom -hfs -hide-hfs src/html src

would exclude just the file or directory called "html" from the "src" directory. Any other file or directory called "html" in the tree will not be excluded. Should be used with the -hide and/or -hide-joliet options. In order to match a directory name, make sure the pathname does not include a trailing '/' character. See README.hide for more details.

-hide-hfs-list file
A file containing a list of globs to be hidden as above.
-hfs-volid hfs_volid
Volume name for the HFS partition. This is the name that is assigned to the disc on a Macintosh and replaces the volid used with the -V option
-icon-position
Use the icon position information, if it exists, from the Apple/Unix file. The icons will appear in the same position as they would on a Macintosh desktop. Folder location and size on screen, its scroll positions, folder View (view as Icons, Small Icons, etc.) are also preserved. This option may become set by default in the future. (Alpha).
-root-info file
Set the location, size on screen, scroll positions, folder View etc. for the root folder of an HFS volume. See README.rootinfo for more information. (Alpha)
-prep-boot FILE
PReP boot image file. Up to 4 are allowed. See README.prep_boot (Alpha)
-input-hfs-charset charset
Input charset that defines the characters used in HFS file names when used with the -mac-name option. The default charset is cp10000 (Mac Roman) cp10000 (Mac Roman) See CHARACTER SETS and HFS MACINTOSH FILE NAMES sections below for more details.
-output-hfs-charset charset
Output charset that defines the characters that will be used in the HFS file names. Defaults to the input charset. See CHARACTER SETS section below for more details.
-hfs-unlock
By default, mkisofs will create an HFS volume that is locked. This option leaves the volume unlocked so that other applications (e.g. hfsutils) can modify the volume. See the HFS PROBLEMS/LIMITATIONS section below for warnings about using this option.
-hfs-bless folder_name
"Bless" the given directory (folder). This is usually the System Folder and is used in creating HFS bootable CDs. The name of the directory must be the whole path name as mkisofs sees it. e.g. if the given pathspec is ./cddata and the required folder is called System Folder, then the whole path name is "./cddata/System Folder" (remember to use quotes if the name contains spaces).
-hfs-parms PARAMETERS
Override certain parameters used to create the HFS file system. Unlikely to be used in normal circumstances. See the libhfs_iso/hybrid.h source file for details.
--cap
Look for AUFS CAP Macintosh files. Search for CAP Apple/Unix file formats only. Searching for the other possible Apple/Unix file formats is disabled, unless other double dash options are given.
--netatalk
Look for NETATALK Macintosh files
--double
Look for AppleDouble Macintosh files
--ethershare
Look for Helios EtherShare Macintosh files
--ushare
Look for IPT UShare Macintosh files
--exchange
Look for PC Exchange Macintosh files
--sgi
Look for SGI Macintosh files
--xinet
Look for XINET Macintosh files
--macbin
Look for MacBinary Macintosh files
--single
Look for AppleSingle Macintosh files
--dave
Look for Thursby Software Systems DAVE Macintosh files
--sfm
Look for Microsoft's Services for Macintosh files (NT only) (Alpha)
--osx-double
Look for MacOS X AppleDouble Macintosh files
--osx-hfs
Look for MacOS X HFS Macintosh files

CHARACTER SETS

mkisofs processes file names in a POSIX compliant way as strings of 8-bit characters. To represent all codings for all languages, 8-bit characters are not sufficient. Unicode or ISO-10646 define character codings that need at least 21 bits to represent all known languages. They may be represented with UTF-32, UTF-16 or UTF-8 coding. UTF-32 uses a plain 32-bit coding but seems to be uncommon. UTF-16 is used by Microsoft with Win32 with the disadvantage that it only supports a subset of all codes and that 16-bit characters are not compliant with the POSIX filesystem interface.

Modern UNIX operating systems may use UTF-8 coding for filenames. This coding allows to use the complete Unicode code set. Each 32-bit character is represented by one or more 8-bit characters. If a character is coded in ISO-8859-1 (used in Central Europe and North America) is maps 1:1 to a UTF-32 or UTF-16 coded Unicode character. If a character is coded in 7-Bit ASCII (used in USA and other countries with limted character set) is maps 1:1 to a UTF-32, UTF-16 or UTF-8 coded Unicode character. Character codes that cannot be represented as a single byte in UTF-8 (typically if the value is > 0x7F) use escape sequences that map to more than one 8-bit character.

If all operating systems would use UTF-8 coding, mkisofs would not need to recode characters in file names. Unfortunately, Apple uses completely nonstandard codings and Microsoft uses a Unicode coding that is not compatible with the POSIX filename interface.

For all non UTF-8 coded operating systems, the actual character that each byte represents depends on the character set or codepage (which is the name used by Microsoft) used by the local operating system in use - the characters in a character set will reflect the region or natural language used by the user.

Usually character codes 0x00-0x1f are control characters, codes 0x20-0x7f are the 7 bit ASCII characters and (on PC's and Mac's) 0x80-0xff are used for other characters. Unfortunately even this does not follow ISO standards that reserve the range 0x80-0x9f for control characters and only allow 0xa0-0xff for other characters.

As there is a lot more than 256 characters/symbols in use, only a small subset are represented in a character set. Therefore the same character code may represent a different character in different character sets. So a file name generated, say in central Europe, may not display the same character when viewed on a machine in, say eastern Europe.

To make matters more complicated, different operating systems use different character sets for the region or language. For example the character code for "small e with acute accent" may be character code 0x82 on a PC, code 0x8e on a Macintosh and code 0xe9 on a UNIX system. Note while the codings used on a PC or Mac are nonstandard, Unicode codes this character as 0x00000000e9 which is basically the same value as the value used by most UNIX systems.

As long as not all operating systems and applications will use the Unicode character set as the basis for file names in a unique way, it may be necessary to specify which character set your file names use in and which character set the file names should appear on the CD.

There are four options to specify the character sets you want to use:

-input-charset
Defines the local character set you are using on your host machine. Any character set conversions that take place will use this character set as the staring point. The default input character sets are cp437 on DOS based systems and iso8859-1 on all other systems.

If the -J option is given, then the Unicode equivalents of the input character set will be used in the Joliet directory. Using the -jcharset option is the same as using the -input-charset and -J options.

-output-charset
Defines the character set that will be used with for the Rock Ridge names on the CD. Defaults to the input character set. Only likely to be useful if used on a non-Unix platform. e.g. using mkisofs on a Microsoft Win32 machine to create Rock Ridge CDs. If you are using mkisofs on a Unix machine, it is likely that the output character set will be the same as the input character set.
-input-hfs-charset
Defines the HFS character set used for HFS file names decoded from any of the various Apple/Unix file formats. Only useful when used with -mac-name option. See the HFS MACINTOSH FILE NAMES for more information. Defaults to cp10000 (Mac Roman).
-output-hfs-charset
Defines the HFS character set used to create HFS file names from the input character set in use. In most cases this will be from the character set given with the -input-charset option. Defaults to the input HFS character set.

There are a number of character sets built in to mkisofs. To get a listing, use mkisofs -input-charset help.

Additional character sets can be read from file for any of the character set options by giving a filename as the argument to the options. The given file will only be read if its name does not match one of the built in character sets.

The format of the character set files is the same as the mapping files available from http://www.unicode.org/Public/MAPPINGS The format of these files is:

        Column #1 is the input byte code (in hex as 0xXX)

       Column #2 is the Unicode (in hex as 0xXXXX)

       Rest of the line is ignored.

Any blank line, line without two (or more) columns in the above format or comments lines (starting with the # character) are ignored without any warnings. Any missing input code is mapped to Unicode character 0x0000.

Note that there is no support for 16 bit UNICODE (UTF-16) or 32 bit UNICODE (UTF-32) coding because this coding is not POSIX compliant. There should be support for UTF-8 UNICODE coding which is compatible to POSIX filenames and supported by moder UNIX implementations such as Solaris.

A 1:1 character set mapping can be defined by using the keyword default as the argument to any of the character set options. This is the behaviour of older (v1.12) versions of mkisofs.

The ISO9660 file names generated from the input filenames are not converted from the input character set. The ISO9660 character set is a very limited subset of the ASCII characters, so any conversion would be pointless.

Any character that mkisofs can not convert will be replaced with a '_' character.

HFS CREATOR/TYPE

A Macintosh file has two properties associated with it which define which application created the file, the CREATOR and what data the file contains, the TYPE. Both are (exactly) 4 letter strings. Usually this allows a Macintosh user to double-click on a file and launch the correct application etc. The CREATOR and TYPE of a particular file can be found by using something like ResEdit (or similar) on a Macintosh.

The CREATOR and TYPE information is stored in all the various Apple/Unix encoded files. For other files it is possible to base the CREATOR and TYPE on the filename's extension using a mapping file (the -map option) and/or using the magic number (usually a signature in the first few bytes) of a file (the -magic option). If both these options are given, then their order on the command line is important. If the -map option is given first, then a filename extension match is attempted before a magic number match. However, if the -magic option is given first, then a magic number match is attempted before a filename extension match.

If a mapping or magic file is not used, or no match is found then the default CREATOR and TYPE for all regular files can be set by using entries in the .mkisofsrc file or using the -hfs-creator and/or -hfs-type options, otherwise the default CREATOR and TYPE are 'unix' and 'TEXT'.

The format of the mapping file is the same afpfile format as used by aufs. This file has five columns for the extension, file translation, CREATOR, TYPE and Comment. Lines starting with the '#' character are comment lines and are ignored. An example file would be like:

# Example filename mapping file
#
# EXTN | XLate | CREATOR | TYPE | Comment
.tif | Raw | '8BIM' | 'TIFF' | "Photoshop TIFF image"
.hqx | Ascii | 'BnHq' | 'TEXT' | "BinHex file"
.doc | Raw | 'MSWD' | 'WDBN' | "Word file"
.mov | Raw | 'TVOD' | 'MooV' | "QuickTime Movie"
* | Ascii | 'ttxt' | 'TEXT' | "Text file"

Where:

The first column EXTN defines the Unix filename extension to be mapped. The default mapping for any filename extension that doesn't match is defined with the "*" character.
The Xlate column defines the type of text translation between the Unix and Macintosh file it is ignored by mkisofs, but is kept to be compatible with aufs(1). Although mkisofs does not alter the contents of a file, if a binary file has it's TYPE set as 'TEXT', it may be read incorrectly on a Macintosh. Therefore a better choice for the default TYPE may be '????'
The CREATOR and TYPE keywords must be 4 characters long and enclosed in single quotes.
The comment field is enclosed in double quotes - it is ignored by mkisofs, but is kept to be compatible with aufs.

The format of the magic file is almost identical to the magic(4) file used by the Linux file(1) command - the routines for reading and decoding the magic file are based on the Linux file(1) command.

This file has four tab separated columns for the byte offset, type, test and message. Lines starting with the '#' character are comment lines and are ignored. An example file would be like:

# Example magic file
#
# off | type | test | message
0 | string | GIF8 | 8BIM GIFf GIF image
0 | beshort | 0xffd8 | 8BIM JPEG image data
0 | string | SIT! | SIT! SIT! StuffIt Archive
0 | string | \037\235 | LZIV ZIVU standard unix compress
0 | string | \037\213 | GNUz ZIVU gzip compressed data
0 | string | %! | ASPS TEXT Postscript
0 | string | \004%! | ASPS TEXT PC Postscript with a ^D to start
4 | string | moov | txtt MooV QuickTime movie file (moov)
4 | string | mdat | txtt MooV QuickTime movie file (mdat)

The format of the file is described in the magic(4) man page. The only difference here is that for each entry in the magic file, the message for the initial offset must be 4 characters for the CREATOR followed by 4 characters for the TYPE - white space is optional between them. Any other characters on this line are ignored. Continuation lines (starting with a '>') are also ignored i.e. only the initial offset lines are used.

Using the -magic option may significantly increase processing time as each file has to opened and read to find it's magic number.

In summary, for all files, the default CREATOR is 'unix' and the default TYPE is 'TEXT'. These can be changed by using entries in the .mkisofsrc file or by using the -hfs-creator and/or -hfs-type options.

If the a file is in one of the known Apple/Unix formats (and the format has been selected), then the CREATOR and TYPE are taken from the values stored in the Apple/Unix file.

Other files can have their CREATOR and TYPE set from their file name extension (the -map option), or their magic number (the -magic option). If the default match is used in the mapping file, then these values override the default CREATOR and TYPE.

A full CREATOR/TYPE database can be found at http://www.angelfire.com/il/szekely/index.html

HFS MACINTOSH FILE FORMATS

Macintosh files have two parts called the Data and Resource fork. Either may be empty. Unix (and many other OSs) can only cope with files having one part (or fork). To add to this, Macintosh files have a number of attributes associated with them - probably the most important are the TYPE and CREATOR. Again Unix has no concept of these types of attributes.

e.g. a Macintosh file may be a JPEG image where the image is stored in the Data fork and a desktop thumbnail stored in the Resource fork. It is usually the information in the data fork that is useful across platforms.

Therefore to store a Macintosh file on a Unix filesystem, a way has to be found to cope with the two forks and the extra attributes (which are referred to as the finder info). Unfortunately, it seems that every software package that stores Macintosh files on Unix has chosen a completely different storage method.

The Apple/Unix formats that mkisofs (partially) supports are:

CAP AUFS format
Data fork stored in a file. Resource fork in subdirectory .resource with same filename as data fork. Finder info in .finderinfo subdirectory with same filename.
AppleDouble/Netatalk
Data fork stored in a file. Resource fork stored in a file with same name prefixed with "%". Finder info also stored in same "%" file. Netatalk uses the same format, but the resource fork/finderinfo stored in subdirectory .AppleDouble with same name as data fork.
AppleSingle
Data structures similar to above, except both forks and finder info are stored in one file.
Helios EtherShare
Data fork stored in a file. Resource fork and finder info together in subdirectory .rsrc with same filename as data fork.
IPT UShare
Very similar to the EtherShare format, but the finder info is stored slightly differently.
MacBinary
Both forks and finder info stored in one file.
Apple PC Exchange
Used by Macintoshes to store Apple files on DOS (FAT) disks. Data fork stored in a file. Resource fork in subdirectory resource.frk (or RESOURCE.FRK). Finder info as one record in file finder.dat (or FINDER.DAT). Separate finder.dat for each data fork directory.
Note: mkisofs needs to know the native FAT cluster size of the disk that the PC Exchange files are on (or have been copied from). This size is given by the -cluster-size option. The cluster or allocation size can be found by using the DOS utility CHKDSK.
May not work with PC Exchange v2.2 or higher files (available with MacOS 8.1). DOS media containing PC Exchange files should be mounted as type msdos (not vfat) when using Linux.
SGI/XINET
Used by SGI machines when they mount HFS disks. Data fork stored in a file. Resource fork in subdirectory .HSResource with same name. Finder info as one record in file .HSancillary. Separate .HSancillary for each data fork directory.
Thursby Software Systems DAVE
Allows Macintoshes to store Apple files on SMB servers. Data fork stored in a file. Resource fork in subdirectory resource.frk. Uses the AppleDouble format to store resource fork.
Services for Macintosh
Format of files stored by NT Servers on NTFS filesystems. Data fork is stored as "filename". Resource fork stored as a NTFS stream called "filename:AFP_Resource". The finder info is stored as a NTFS stream called "filename:Afp_AfpInfo". These streams are normally invisible to the user.
Warning: mkisofs only partially supports the SFM format. If an HFS file or folder stored on the NT server contains an illegal NT character in its name, then NT converts these characters to Private Use Unicode characters. The characters are: " * / < > ? | also a space or period if it is the last character of the file name, character codes 0x01 to 0x1f (control characters) and Apple' apple logo.
Unfortunately, these private Unicode characters are not readable by the mkisofs NT executable. Therefore any file or directory name containing these characters will be ignored - including the contents of any such directory.
MacOS X AppleDouble
When HFS/HFS+ files are copied or saved by MacOS X on to a non-HFS file system (e.g. UFS, NFS etc.), the files are stored in AppleDouble format. Data fork stored in a file. Resource fork stored in a file with same name prefixed with "._". Finder info also stored in same "._" file.
MacOS X HFS (Alpha)
Not really an Apple/Unix encoding, but actual HFS/HFS+ files on a MacOS X system. Data fork stored in a file. Resource fork stored in a pseudo file with the same name with the suffix '/rsrc'. The finderinfo is only available via a MacOS X library call.
Notes: (also see README.macosx)
Only works when used on MacOS X.
If a file is found with a zero length resource fork and empty finderinfo, it is assumed not to have any Apple/Unix encoding - therefore a TYPE and CREATOR can be set using other methods.

mkisofs will attempt to set the CREATOR, TYPE, date and possibly other flags from the finder info. Additionally, if it exists, the Macintosh filename is set from the finder info, otherwise the Macintosh name is based on the Unix filename - see the HFS MACINTOSH FILE NAMES section below.

When using the -apple option, the TYPE and CREATOR are stored in the optional System Use or SUSP field in the ISO9660 Directory Record - in much the same way as the Rock Ridge attributes are. In fact to make life easy, the Apple extensions are added at the beginning of the existing Rock Ridge attributes (i.e. to get the Apple extensions you get the Rock Ridge extensions as well).

The Apple extensions require the resource fork to be stored as an ISO9660 associated file. This is just like any normal file stored in the ISO9660 filesystem except that the associated file flag is set in the Directory Record (bit 2). This file has the same name as the data fork (the file seen by non-Apple machines). Associated files are normally ignored by other OSs

When using the -hfs option, the TYPE and CREATOR plus other finder info, are stored in a separate HFS directory, not visible on the ISO9660 volume. The HFS directory references the same data and resource fork files described above.

In most cases, it is better to use the -hfs option instead of the -apple option, as the latter imposes the limited ISO9660 characters allowed in filenames. However, the Apple extensions do give the advantage that the files are packed on the disk more efficiently and it may be possible to fit more files on a CD - important when the total size of the source files is approaching 650MB.

HFS MACINTOSH FILE NAMES

Where possible, the HFS filename that is stored with an Apple/Unix file is used for the HFS part of the CD. However, not all the Apple/Unix encodings store the HFS filename with the finderinfo. In these cases, the Unix filename is used - with escaped special characters. Special characters include '/' and characters with codes over 127.

Aufs escapes these characters by using ":" followed by the character code as two hex digits. Netatalk and EtherShare have a similar scheme, but uses "%" instead of a ":".

If mkisofs can't find an HFS filename, then it uses the Unix name, with any %xx or :xx characters (xx == two hex digits) converted to a single character code. If "xx" are not hex digits ([0-9a-fA-F]), then they are left alone - although any remaining ":" is converted to "%" as colon is the HFS directory separator. Care must be taken, as an ordinary Unix file with %xx or :xx will also be converted. e.g.

This:2fFile | converted to This/File
This:File | converted to This%File
This:t7File | converted to This%t7File

Although HFS filenames appear to support upper and lower case letters, the filesystem is case insensitive. i.e. the filenames "aBc" and "AbC" are the same. If a file is found in a directory with the same HFS name, then mkisofs will attempt, where possible, to make a unique name by adding '_' characters to one of the filenames.

If an HFS filename exists for a file, then mkisofs can use this name as the starting point for the ISO9660, Joliet and Rock Ridge filenames using the -mac-name option. Normal Unix files without an HFS name will still use their Unix name. e.g.

If a MacBinary (or PC Exchange) file is stored as someimage.gif.bin on the Unix filesystem, but contains a HFS file called someimage.gif, then this is the name that would appear on the HFS part of the CD. However, as mkisofs uses the Unix name as the starting point for the other names, then the ISO9660 name generated will probably be SOMEIMAG.BIN and the Joliet/Rock Ridge would be someimage.gif.bin. Although the actual data (in this case) is a GIF image. This option will use the HFS filename as the starting point and the ISO9660 name will probably be SOMEIMAG.GIF and the Joliet/Rock Ridge would be someimage.gif.

Using the -mac-name option will not currently work with the -T option - the Unix name will be used in the TRANS.TBL file, not the Macintosh name.

The character set used to convert any HFS file name to a Joliet/Rock Ridge file name defaults to cp10000 (Mac Roman). The character set used can be specified using the -input-hfs-charset option. Other built in HFS character sets are: cp10006 (MacGreek), cp10007 (MacCyrillic), cp10029 (MacLatin2), cp10079 (MacIcelandandic) and cp10081 (MacTurkish).

Note: the character codes used by HFS file names taken from the various Apple/Unix formats will not be converted as they are assumed to be in the correct Apple character set. Only the Joliet/Rock Ridge names derived from the HFS file names will be converted.

The existing mkisofs code will filter out any illegal characters for the ISO9660 and Joliet filenames, but as mkisofs expects to be dealing directly with Unix names, it leaves the Rock Ridge names as is. But as '/' is a legal HFS filename character, the -mac-name option converts '/' to a '_' in Rock Ridge filenames.

If the Apple extensions are used, then only the ISO9660 filenames will appear on the Macintosh. However, as the Macintosh ISO9660 drivers can use Level 2 filenames, then you can use options like -allow-multidot without problems on a Macintosh - still take care over the names, for example this.file.name will be converted to THIS.FILE i.e. only have one '.', also filename abcdefgh will be seen as ABCDEFGH but abcdefghi will be seen as ABCDEFGHI. i.e. with a '.' at the end - don't know if this is a Macintosh problem or mkisofs/mkhybrid problem. All filenames will be in upper case when viewed on a Macintosh. Of course, DOS/Win3.X machines will not be able to see Level 2 filenames...

HFS CUSTOM VOLUME/FOLDER ICONS

To give a HFS CD a custom icon, make sure the root (top level) folder includes a standard Macintosh volume icon file. To give a volume a custom icon on a Macintosh, an icon has to be pasted over the volume's icon in the "Get Info" box of the volume. This creates an invisible file called 'Icon\r' ('\r' is the 'carriage return' character) in the root folder. A custom folder icon is very similar - an invisible file called 'Icon\r' exits in the folder itself. Probably the easiest way to create a custom icon that mkisofs can use, is to format a blank HFS floppy disk on a Mac, paste an icon to its "Get Info" box. If using Linux with the HFS module installed, mount the floppy using something like:

        mount -t hfs /dev/fd0 /mnt/floppy

The floppy will be mounted as a CAP file system by default. Then run mkisofs using something like:

        mkisofs --cap -o output source_dir /mnt/floppy

If you are not using Linux, then you can use the hfsutils to copy the icon file from the floppy. However, care has to be taken, as the icon file contains a control character. e.g.

        hmount /dev/fd0

       hdir -a

       hcopy -m Icon^V^M icon_dir/icon

Where '^V^M' is control-V followed by control-M. Then run mkisofs by using something like:

        mkisofs --macbin -o output source_dir icon_dir

The procedure for creating/using custom folder icons is very similar - paste an icon to folder's "Get Info" box and transfer the resulting 'Icon\r' file to the relevant directory in the mkisofs source tree.

You may want to hide the icon files from the ISO9660 and Joliet trees.

To give a custom icon to a Joliet CD, follow the instructions found at: http://www.fadden.com/cdrfaq/faq03.html#[3-21]

HFS BOOT DRIVER

It may be possible to make the hybrid CD bootable on a Macintosh.

A bootable HFS CD requires an Apple CD-ROM (or compatible) driver, a bootable HFS partition and the necessary System, Finder, etc. files.

A driver can be obtained from any other Macintosh bootable CD-ROM using the apple_driver utility. This file can then be used with the -boot-hfs-file option.

The HFS partition (i.e. the hybrid disk in our case) must contain a suitable System Folder, again from another CD-ROM or disk.

For a partition to be bootable, it must have it's boot block set. The boot block is in the first two blocks of a partition. For a non-bootable partition the boot block is full of zeros. Normally, when a System file is copied to partition on a Macintosh disk, the boot block is filled with a number of required settings - unfortunately I don't know the full spec for the boot block, so I'm guessing that the following will work OK.

Therefore, the utility apple_driver also extracts the boot block from the first HFS partition it finds on the given CD-ROM and this is used for the HFS partition created by mkisofs.

PLEASE NOTE
By using a driver from an Apple CD and copying Apple software to your CD, you become liable to obey Apple Computer, Inc. Software License Agreements.

EL TORITO BOOT INFORMATION TABLE

When the -boot-info-table option is given, mkisofs will modify the boot file specified by the -b option by inserting a 56-byte "boot information table" at offset 8 in the file. This modification is done in the source filesystem, so make sure you use a copy if this file is not easily recreated! This file contains pointers which may not be easily or reliably obtained at boot time.

The format of this table is as follows; all integers are in section 7.3.1 ("little endian") format.

Offset    Name           Size      Meaning
 8        bi_pvd         4 bytes   LBA of primary volume descriptor
12        bi_file        4 bytes   LBA of boot file
16        bi_length      4 bytes   Boot file length in bytes
20        bi_csum        4 bytes   32-bit checksum
24        bi_reserved    40 bytes  Reserved

The 32-bit checksum is the sum of all the 32-bit words in the boot file starting at byte offset 64. All linear block addresses (LBAs) are given in CD sectors (normally 2048 bytes).

CONFIGURATION

mkisofs looks for the .mkisofsrc file, first in the current working directory, then in the user's home directory, and then in the directory in which the mkisofs binary is stored. This file is assumed to contain a series of lines of the form TAG=value , and in this way you can specify certain options. The case of the tag is not significant. Some fields in the volume header are not settable on the command line, but can be altered through this facility. Comments may be placed in this file, using lines which start with a hash (#) character.
APPI
The application identifier should describe the application that will be on the disc. There is space on the disc for 128 characters of information. May be overridden using the -A command line option.
COPY
The copyright information, often the name of a file on the disc containing the copyright notice. There is space in the disc for 37 characters of information. May be overridden using the -copyright command line option.
ABST
The abstract information, often the name of a file on the disc containing an abstract. There is space in the disc for 37 characters of information. May be overridden using the -abstract command line option.
BIBL
The bibliographic information, often the name of a file on the disc containing a bibliography. There is space in the disc for 37 characters of information. May be overridden using the -bilio command line option.
PREP
This should describe the preparer of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 characters of information. May be overridden using the -p command line option.
PUBL
This should describe the publisher of the CDROM, usually with a mailing address and phone number. There is space on the disc for 128 characters of information. May be overridden using the -publisher command line option.
SYSI
The System Identifier. There is space on the disc for 32 characters of information. May be overridden using the -sysid command line option.
VOLI
The Volume Identifier. There is space on the disc for 32 characters of information. May be overridden using the -V command line option.
VOLS
The Volume Set Name. There is space on the disc for 128 characters of information. May be overridden using the -volset command line option.
HFS_TYPE
The default TYPE for Macintosh files. Must be exactly 4 characters. May be overridden using the -hfs-type command line option.
HFS_CREATOR
The default CREATOR for Macintosh files. Must be exactly 4 characters. May be overridden using the -hfs-creator command line option.

mkisofs can also be configured at compile time with defaults for many of these fields. See the file defaults.h.

EXAMPLES

To create a vanilla ISO-9660 filesystem image in the file cd.iso, where the directory cd_dir will become the root directory if the CD, call:

% mkisofs -o cd.iso cd_dir

To create a CD with Rock Ridge extensions of the source directory cd_dir:

% mkisofs -o cd.iso -R cd_dir

To create a CD with Rock Ridge extensions of the source directory cd_dir where all files have at least read permission and all files are owned by root, call:

% mkisofs -o cd.iso -r cd_dir

To write a tar archive directly to a CD that will later contain a simple iso9660 filesystem with the tar archive call:

% star -c . | mkisofs -stream-media-size 333000 | \
cdrecord dev=b,t,l -dao tsize=333000s -

To create a HFS hybrid CD with the Joliet and Rock Ridge extensions of the source directory cd_dir:

% mkisofs -o cd.iso -R -J -hfs cd_dir

To create a HFS hybrid CD from the source directory cd_dir that contains Netatalk Apple/Unix files:

% mkisofs -o cd.iso --netatalk cd_dir

To create a HFS hybrid CD from the source directory cd_dir, giving all files CREATOR and TYPES based on just their filename extensions listed in the file "mapping".:

% mkisofs -o cd.iso -map mapping cd_dir

To create a CD with the 'Apple Extensions to ISO9660', from the source directories cd_dir and another_dir. Files in all the known Apple/Unix format are decoded and any other files are given CREATOR and TYPE based on their magic number given in the file "magic":

% mkisofs -o cd.iso -apple -magic magic -probe \

cd_dir another_dir

The following example puts different files on the CD that all have the name README, but have different contents when seen as a ISO9660/RockRidge, Joliet or HFS CD.

Current directory contains:

% ls -F
README.hfs README.joliet README.unix cd_dir/

The following command puts the contents of the directory cd_dir on the CD along with the three README files - but only one will be seen from each of the three filesystems:

% mkisofs -o cd.iso -hfs -J -r -graft-points \

-hide README.hfs -hide README.joliet \

-hide-joliet README.hfs -hide-joliet README.unix \

-hide-hfs README.joliet -hide-hfs README.unix \

README=README.hfs README=README.joliet \

README=README.unix cd_dir

i.e. the file README.hfs will be seen as README on the HFS CD and the other two README files will be hidden. Similarly for the Joliet and ISO9660/RockRidge CD.

There are probably all sorts of strange results possible with combinations of the hide options ...

AUTHOR

mkisofs is not based on the standard mk*fs tools for unix, because we must generate a complete copy of an existing filesystem on a disk in the iso9660 filesystem. The name mkisofs is probably a bit of a misnomer, since it not only creates the filesystem, but it also populates it as well. However, the appropriate tool name for a UNIX tool that creates populated filesystems - mkproto - is not well known.

Eric Youngdale <ericy@gnu.ai.mit.edu> or <eric@andante.org> wrote the first versions (1993 ... 1998) of the mkisofs utility. The copyright for old versions of the mkisofs utility is held by Yggdrasil Computing, Incorporated. Joerg Schilling wrote the SCSI transport library and it's adaptation layer to mkisofs and newer parts (starting from 1999) of the utility, this makes mkisofs Copyright (C) 1999, 2000, 2001 Joerg Schilling.

HFS hybrid code Copyright (C) James Pearson 1997, 1998, 1999, 2000, 2001
libhfs code Copyright (C) 1996, 1997 Robert Leslie
libfile code Copyright (C) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995.

NOTES

Mkisofs may safely be installed suid root. This may be needed to allow mkisofs to read the previous session when creating a multi session image.

If mkisofs is creating a filesystem image with Rock Ridge attributes and the directory nesting level of the source directory tree is too much for ISO-9660, mkisofs will do deep directory relocation. This results in a directory called RR_MOVED in the root directory of the CD. You cannot avoid this directory.

The sparc boot support that is implemented with the -sparc-boot options completely follows the official Sparc CD boot requirements from the Boot prom in Sun Sparc systems. Some Linux distributions for Sparc systems use a boot loader called SILO that unfortunately is not Sparc CD boot compliant. It is annoyingly to see that the Authors of SILO don't fix SILO but instead provide a completely unneeded "patch" to mkisofs that incorporates far more source than the fix for SILO would need.

BUGS

*
Any files that have hard links to files not in the tree being copied to the iso9660 filesystem will have an incorrect file reference count.
*
Does not check for SUSP record(s) in "." entry of the root directory to verify the existence of Rock Ridge enhancements.

This problem is present when reading old sessions while adding data in multi-session mode.

*
Does not properly read relocated directories in multi-session mode when adding data.

Any relocated deep directory is lost if the new session does not include the deep directory.

Repeat by: create first session with deep directory relocation then add new session with a single dir that differs from the old deep path.

*
Does not re-use RR_MOVED when doing multi-session from TRANS.TBL
*
Does not create whole_name entry for RR_MOVED in multi-session mode.

There may be some other ones. Please, report them to the author.

HFS PROBLEMS/LIMITATIONS

I have had to make several assumptions on how I expect the modified libhfs routines to work, however there may be situations that either I haven't thought of, or come across when these assumptions fail. Therefore I can't guarantee that mkisofs will work as expected (although I haven't had a major problem yet). Most of the HFS features work fine, however, some are not fully tested. These are marked as Alpha above.

Although HFS filenames appear to support upper and lower case letters, the filesystem is case insensitive. i.e. the filenames "aBc" and "AbC" are the same. If a file is found in a directory with the same HFS name, then mkisofs will attempt, where possible, to make a unique name by adding '_' characters to one of the filenames.

HFS file/directory names that share the first 31 characters have _N' (N == decimal number) substituted for the last few characters to generate unique names.

Care must be taken when "grafting" Apple/Unix files or directories (see above for the method and syntax involved). It is not possible to use a new name for an Apple/Unix encoded file/directory. e.g. If a Apple/Unix encoded file called "oldname" is to added to the CD, then you can not use the command line:

mkisofs -o output.raw -hfs -graft-points newname=oldname cd_dir

mkisofs will be unable to decode "oldname". However, you can graft Apple/Unix encoded files or directories as long as you do not attempt to give them new names as above.

When creating an HFS volume with the multisession options, -M and -C, only files in the last session will be in the HFS volume. i.e. mkisofs can not add existing files from previous sessions to the HFS volume.

However, if each session is created with the -part option, then each session will appear as separate volumes when mounted on a Mac. In this case, it is worth using the -V or -hfs-volid option to give each session a unique volume name, otherwise each "volume" will appear on the Desktop with the same name.

Symbolic links (as with all other non-regular files) are not added to the HFS directory.

Hybrid volumes may be larger than pure ISO9660 volumes containing the same data. In some cases (e.g. DVD sized volumes) the hybrid volume may be significantly larger. As an HFS volume gets bigger, so does the allocation block size (the smallest amount of space a file can occupy). For a 650Mb CD, the allocation block is 10Kb, for a 4.7Gb DVD it will be about 70Kb.

The maximum number of files in an HFS volume is about 65500 - although the real limit will be somewhat less than this.

The resulting hybrid volume can be accessed on a Unix machine by using the hfsutils routines. However, no changes can be made to the volume as it is set as locked. The option -hfs-unlock will create an output image that is unlocked - however no changes should be made to the contents of the volume (unless you really know what you are doing) as it's not a "real" HFS volume.

Using the -mac-name option will not currently work with the -T option - the Unix name will be used in the TRANS.TBL file, not the Macintosh name.

Although mkisofs does not alter the contents of a file, if a binary file has it's TYPE set as 'TEXT', it may be read incorrectly on a Macintosh. Therefore a better choice for the default TYPE may be '????'

The -mac-boot-file option may not work at all...

May not work with PC Exchange v2.2 or higher files (available with MacOS 8.1). DOS media containing PC Exchange files should be mounted as type msdos (not vfat) when using Linux.

The SFM format is only partially supported - see HFS MACINTOSH FILE FORMATS section above.

It is not possible to use the the -sparc-boot or -generic-boot options with the -boot-hfs-file or -prep-boot options.

mkisofs should be able to create HFS hybrid images over 4Gb, although this has not been fully tested.

SEE ALSO

cdrecord(1), mkzftree(1), magic(5), apple_driver(8).

FUTURE IMPROVEMENTS

Some sort of gui interface.

AVAILABILITY

mkisofs is available as part of the cdrecord package from ftp://ftp.berlios.de/pub/cdrecord/

hfsutils from ftp://ftp.mars.org/pub/hfs

mkzftree is available as part of the zisofs-tools package from ftp://ftp.kernel.org/pub/linux/utils/fs/zisofs/

MAILING LISTS

If you want to actively take part on the development of mkisofs, and/or mkhybrid, you may join the cdwriting mailing list by sending mail to:

          other-cdwrite-request@lists.debian.org
and include the word subscribe in the body. The mail address of the list is:

          cdwrite@lists.debian.org

MAINTAINER

Joerg Schilling
Seestr. 110
D-13353 Berlin
Germany

HFS MKHYBRID MAINTAINER

James Pearson

j.pearson@ge.ucl.ac.uk

If you have support questions, send them to:

cdrecord-support@berlios.de
or other-cdwrite@lists.debian.org

Of you definitly found a bug, send a mail to:

cdrecord-developers@berlios.de
or schilling@fokus.fhg.de

To subscribe, use:

http://lists.berlios.de/mailman/listinfo/cdrecord-developers
or http://lists.berlios.de/mailman/listinfo/cdrecord-support

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
HFS OPTIONS
CHARACTER SETS
HFS CREATOR/TYPE
HFS MACINTOSH FILE FORMATS
HFS MACINTOSH FILE NAMES
HFS CUSTOM VOLUME/FOLDER ICONS
HFS BOOT DRIVER
EL TORITO BOOT INFORMATION TABLE
CONFIGURATION
EXAMPLES
AUTHOR
NOTES
BUGS
HFS PROBLEMS/LIMITATIONS
SEE ALSO
FUTURE IMPROVEMENTS
AVAILABILITY
MAILING LISTS
MAINTAINER
HFS MKHYBRID MAINTAINER
This document was created by man2html, using the manual pages.
Time: GMT, June 24, 2004


Manpage of CDDA2WAV

CDDA2WAV

Section: User Commands (1)
Index Return to Main Contents

NAME

cdda2wav - a sampling utility that dumps CD audio data into wav sound files

SYNOPSIS

cdda2wav [-c chans] [-s] [-m] [-b bits] [-r rate] [-a divider] [-t track[+endtrack]] [-i index] [-o offset] [-d duration] [-x] [-q] [-w] [-v optlist] [-V] [-Q] [-J] [-L cddbmode] [-R] [-P sectors] [-F] [-G] [-T] [-e] [-p percentage] [-n sectors] [-l buffers] [-N] [-J] [-H] [-g] [-B] [-D device] [-A auxdevice] [-I interface] [-O audiotype] [-C input-endianess] [-E output-endianess] [-M count] [-S speed] [-paranoia] [cddbp-server=servername] [cddbp-port=portnumber] [filename(s) or directories]

DESCRIPTION

cdda2wav can retrieve audio tracks from CDROM drives (see README for a list of drives) that are capable of reading audio data digitally to the host (CDDA).

OPTIONS

dev=device
-D device
-device device
uses device as the source for CDDA reading. For example /dev/cdrom for the cooked_ioctl interface and Bus,ID,Lun for the generic_scsi interface. The device has to correspond with the interface setting (see below).

Using the cooked_ioctl is not recommended as this makes cdda2wav mainly depend on the audio extraction quality of the operating system which is usually extremely bad.

The setting of the environment variable CDDA_DEVICE is overridden by this option.

-A auxdevice
-auxdevice auxdevice
uses auxdevice as CDROM drive for ioctl usage.
-I interface
-interface interface
specifies the interface for CDROM access: generic_scsi or (on Linux, and FreeBSD systems) cooked_ioctl.
-c channels --channels
uses 1 for mono, or 2 for stereo recording, or s for stereo recording with both channels swapped.
-s --stereo
sets to stereo recording.
-m --mono
sets to mono recording.
-x --max
sets maximum (CD) quality.
-b bits --bits-per-sample
sets bits per sample per channel: 8, 12 or 16.
-r rate --rate
sets rate in samples per second. Possible values are listed with the -R option.
-a divider --divider
sets rate to 44100Hz / divider. Possible values are listed with the -R option.
-R --dump-rates
shows a list of all sample rates and their dividers.
-P sectors --set-overlap
sets the initial number of overlap sectors for jitter correction.
-n sectors --sectors-per-request
reads sectors per request.
-l buffers --buffers-in-ring
uses a ring buffer with buffers total.
-t track+endtrack --track
selects the start track and optionally the end track.
-i index --index
selects the start index.
-o offset --offset
starts offset sectors behind start track (one sector equivalents 1/75 seconds).
-O audiotype --output-format
can be wav (for wav files) or aiff (for apple/sgi aiff files) or aifc (for apple/sgi aifc files) or au or sun (for sun .au PCM files) or cdr or raw (for headerless files to be used for cd writers).
-C endianess --cdrom-endianess
sets endianess of the input samples to 'little', 'big' or 'guess' to override defaults.
-E endianess --output-endianess
sets endianess of the output samples to 'little' or 'big' to override defaults.
-d duration --duration
sets recording time in seconds or frames. Frames (sectors) are indicated by a 'f' suffix (like 75f for 75 sectors). 0 sets the time for whole track.
-B --bulk --alltracks
copies each track into a seperate file.
-w --wait
waits for signal, then start recording.
-F --find-extremes
finds extrem amplitudes in samples.
-G --find-mono
finds if input samples are in mono.
-T --deemphasize
undo the effect of pre-emphasis in the input samples.
-e --echo
copies audio data to sound device e.g. /dev/dsp.
-p percentage --set-pitch
changes pitch of audio data copied to sound device.
-v itemlist --verbose-level
prints verbose information about the CD. Level is a list of comma seperated suboptions. Each suboption controls the type of information to be reported.
Suboption Description
disable no information is given, warnings appear however
all all information is given
toc show table of contents
summary show a summary of the recording parameters
indices determine and display index offsets
catalog retrieve and display the media catalog number MCN
trackid retrieve and display all Intern. Standard Recording Codes ISRC
sectors show the table of contents in start sector notation
titles show the table of contents with track titles (when available)
-N --no-write
does not write to a file, it just reads (for debugging purposes).
-J --info-only
does not write to a file, it just gives information about the disc.
-L cddb mode --cddb
does a cddbp album- and track title lookup based on the cddb id. The parameter cddb mode defines how multiple entries shall be handled.
Parameter Description
0 interactive mode. The user selects the entry to use.
1 first fit mode. The first entry is taken unconditionally.
cddbp-server=servername
sets the server to be contacted for title lookups.
cddbp-port=portnumber
sets the port number to be used for title lookups.
-H --no-infofile
does not write an info file and a cddb file.
-g --gui
formats the output to be better parsable by gui frontends.
-M count --md5
enables calculation of MD-5 checksum for 'count' bytes from a beginning of a track.
-S speed --speed
sets the cdrom device to one of the selectable speeds for reading.
-q --quiet
quiet operation, no screen output.
-V --verbose-SCSI
enable SCSI command logging to the console. This is mainly used for debugging.
-Q --silent-SCSI
suppress SCSI command error reports to the console. This is mainly used for guis.
-scanbus
Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may be used to find SCSI address of the CD/DVD-Recorder on a system. The numbers printed out as labels are computed by: bus * 100 + target
-paranoia
use the paranoia library instead of cdda2wav's routines for reading.
-h --help
display version of cdda2wav on standard output.
Defaults depend on the
Makefile and environment variable settings (currently CDDA_DEVICE ).

ENVIRONMENT VARIABLES

CDDA_DEVICE is used to set the device name. The device naming is compatible with Joerg Schilling's cdrecord package.
CDDBP_SERVER
is used for cddbp title lookups when supplied.
CDDBP_PORT
is used for cddbp title lookups when supplied.
RSH
If the RSH environment variable is present, the remote connection will not be created via rcmd(3) but by calling the program pointed to by RSH. Use e.g. RSH=/usr/bin/ssh to create a secure shell connection.

Note that this forces cdda2wav to create a pipe to the rsh(1) program and disallows cdda2wav to directly access the network socket to the remote server. This makes it impossible to set up performance parameters and slows down the connection compared to a root initiated rcmd(3) connection.

RSCSI
If the RSCSI environment variable is present, the remote SCSI server will not be the program /opt/schily/sbin/rscsi but the program pointed to by RSCSI. Note that the remote SCSI server program name will be ignored if you log in using an account that has been created with a remote SCSI server program as login shell.

RETURN VALUES

cdda2wav uses the following exit codes to indicate various degress of success:
Exitcode | Description
0 | no errors encountered, successful operation.
1 | usage or syntax error. cdda2wav got inconsistent arguments.
2 | permission (un)set errors. permission changes failed.
3 | read errors on the cdrom/burner device encountered.
4 | write errors while writing one of the output files encountered.
5 | errors with soundcard handling (initialization/write).
6 | errors with stat() system call on the read device (cooked ioctl).
7 | pipe communication errors encountered (in forked mode).
8 | signal handler installation errors encountered.
9 | allocation of shared memory failed (in forked mode).
10 | dynamic heap memory allocation failed.
11 | errors on the audio cd medium encountered.
12 | device open error in ioctl handling detected.
13 | race condition in ioctl interface handling detected.
14 | error in ioctl() operation encountered.
15 | internal error encountered. Please report back!!!
16 | error in semaphore operation encountered (install / request).
17 | could not get the scsi transfer buffer.
18 | could not create pipes for process communication (in forked mode).

DISCUSSION

cdda2wav is able to read parts of an audio CD or multimedia CDROM (containing audio parts) directly digitally. These parts can be written to a file, a pipe, or to a sound device.

cdda2wav stands for CDDA to WAV (where CDDA stands for compact disc digital audio and WAV is a sound sample format introduced by MS Windows). It allows copying CDDA audio data from the CDROM drive into a file in WAV or other formats.

The latest versions try to get higher real-time scheduling priorities to ensure smooth (uninterrupted) operation. These priorities are available for super users and are higher than those of 'normal' processes. Thus delays are minimized.

If your CDROM is on device DEV and it is loaded with an audio CD, you may simply invoke cdda2wav dev=DEV and it will create the sound file audio.wav recording the whole track beginning with track 1 in stereo at 16 bit at 44100 Hz sample rate, if your file system has enough space free. Otherwise recording time will be limited. For details see files README and README.INSTALL

HINTS ON OPTIONS

Options
Most of the options are used to control the format of the WAV file. In the following text all of them are described.
Select Device
-D device selects the CDROM drive device to be used. The specifier given should correspond to the selected interface (see below). CHANGE! For the cooked_ioctl interface this is the cdrom device descriptor as before. The SCSI devices used with the generic SCSI interface however are now addressed with their SCSI-Bus, SCSI-Id, and SCSI-Lun instead of the generic SCSI device descriptor!!! One example for a SCSI CDROM drive on bus 0 with SCSI ID 3 and lun 0 is -D0,3,0.
Select Auxiliary device
-A auxdevice is necessary for CD-Extra handling. For Non-SCSI-CDROM drives this is the same device as given by -D (see above). For SCSI-CDROM drives it is the CDROM drive (SCSI) device (i.e. /dev/sr0 ) corresponding to the SCSI device (i.e. 0,3,0 ). It has to match the device used for sampling.
Select Interface
-I interface selects the CDROM drive interface. For SCSI drives use generic_scsi (cooked_ioctl may not yet be available for all devices): generic_scsi and cooked_ioctl. The first uses the generic SCSI interface, the latter uses the ioctl of the CDROM driver. The latter variant works only when the kernel driver supports CDDA reading. This entry has to match the selected CDROM device (see above).
Enable echo to soundcard
-e copies audio data to the sound card while recording, so you hear it nearly simultaneously. The soundcard gets the same data that is recorded. This is time critical, so it works best with the -q option. To use cdda2wav as a pseudo CD player without recording in a file you could use cdda2wav -q -e -t2 -d0 -N to play the whole second track. This feature reduces the recording speed to at most onefold speed. You cannot make better recordings than your sound card can play (since the same data is used).
Change pitch of echoed audio
-p percentage changes the pitch of all audio echoed to a sound card. Only the copy to the soundcard is affected, the recorded audio samples in a file remain the same. Normal pitch, which is the default, is given by 100%. Lower percentages correspond to lower pitches, i.e. -p 50 transposes the audio output one octave lower. See also the script pitchplay as an example. This option was contributed by Raul Sobon.
Select mono or stereo recording
-m or -c 1 selects mono recording (both stereo channels are mixed), -s or -c 2 or -c s selects stereo recording. Parameter s will swap both sound channels.
Select maximum quality
-x will set stereo, 16 bits per sample at 44.1 KHz (full CD quality). Note that other format options given later can change this setting.
Select sample quality
-b 8 specifies 8 bit (1 Byte) for each sample in each channel; -b 12 specifies 12 bit (2 Byte) for each sample in each channel; -b 16 specifies 16 bit (2 Byte) for each sample in each channel (Ensure that your sample player or sound card is capable of playing 12-bit or 16-bit samples). Selecting 12 or 16 bits doubles file size. 12-bit samples are aligned to 16-bit samples, so they waste some disk space.
Select sample rate
-r samplerate selects a sample rate. samplerate can be in a range between 44100 and 900. Option -R lists all available rates.
Select sample rate divider
-a divider selects a sample rate divider. divider can be minimally 1 and maximally 50.5 and everything between in steps of 0.5. Option -R lists all available rates.
To make the sound smoother at lower sampling rates, cdda2wav sums over n samples (where n is the specific dividend). So for 22050 Hertz output we have to sum over 2 samples, for 900 Hertz we have to sum over 49 samples. This cancels higher frequencies. Standard sector size of an audio CD (ignoring additional information) is 2352 Bytes. In order to finish summing for an output sample at sector boundaries the rates above have to be choosen. Arbitrary sampling rates in high quality would require some interpolation scheme, which needs much more sophisticated programming.
List a table of all sampling rates
-R shows a list of all sample rates and their dividers. Dividers can range from 1 to 50.5 in steps of 0.5.
Select start track and optionally end track
-t n+m selects n as the start track and optionally m as the last track of a range to be recorded. These tracks must be from the table of contents. This sets the track where recording begins. Recording can advance through the following tracks as well (limited by the optional end track or otherwise depending on recording time). Whether one file or different files are then created depends on the -B option (see below).
Select start index
-i n selects the index to start recording with. Indices other than 1 will invoke the index scanner, which will take some time to find the correct start position. An offset may be given additionally (see below).
Set recording time
-d n sets recording time to n seconds or set recording time for whole track if n is zero. In order to specify the duration in frames (sectors) also, the argument can have an appended 'f'. Then the numerical argument is to be taken as frames (sectors) rather than seconds. Please note that if track ranges are being used they define the recording time as well thus overriding any -d option specified times.
Recording time is defined as the time the generated sample will play (at the defined sample rate). Since it's related to the amount of generated samples, it's not the time of the sampling process itself (which can be less or more). It's neither strictly coupled with the time information on the audio CD (shown by your hifi CD player). Differences can occur by the usage of the -o option (see below). Notice that recording time will be shortened, unless enough disk space exists. Recording can be aborted at anytime by pressing the break character (signal SIGQUIT).
Record all tracks of a complete audio CD in seperate files
-B copies each track into a seperate file. A base name can be given. File names have an appended track number and an extension corresponding to the audio format. To record all audio tracks of a CD, use a sufficient high duration (i.e. -d99999).
Set start sector offset
-o sectors increments start sector of the track by sectors. By this option you are able to skip a certain amount at the beginning of a track so you can pick exactly the part you want. Each sector runs for 1/75 seconds, so you have very fine control. If your offset is so high that it would not fit into the current track, a warning message is issued and the offset is ignored. Recording time is not reduced. (To skip introductory quiet passages automagically, use the -w option see below.)
Wait for signal option
-w Turning on this option will suppress all silent output at startup, reducing possibly file size. cdda2wav will watch for any signal in the output signal and switches on writing to file.
Find extrem samples
-F Turning on this option will display the most negative and the most positive sample value found during recording for both channels. This can be useful for readjusting the volume. The values shown are not reset at track boundaries, they cover the complete sampling process. They are taken from the original samples and have the same format (i.e. they are independent of the selected output format).
Find if input samples are in mono
-G If this option is given, input samples for both channels will be compared. At the end of the program the result is printed. Differences in the channels indicate stereo, otherwise when both channels are equal it will indicate mono.
Undo the pre-emphasis in the input samples
-T Some older audio CDs are recorded with a modified frequency response called pre-emphasis. This is found mostly in classical recordings. The correction can be seen in the flags of the Table Of Contents often. But there are recordings, that show this setting only in the subchannels. If this option is given, the index scanner will be started, which reads the q-subchannel of each track. If pre-emphasis is indicated in the q-subchannel of a track, but not in the TOC, pre-emphasis will be assumed to be present, and subsequently a reverse filtering is done for this track before the samples are written into the audio file.
Set audio format
-O audiotype can be wav (for wav files) or au or sun (for sun PCM files) or cdr or raw (for headerless files to be used for cd writers). All file samples are coded in linear pulse code modulation (as done in the audio compact disc format). This holds for all audio formats. Wav files are compatible to Wind*ws sound files, they have lsb,msb byte order as being used on the audio cd. The default filename extension is '.wav'. Sun type files are not like the older common logarithmically coded .au files, but instead as mentioned above linear PCM is used. The byte order is msb,lsb to be compatible. The default filename extension is '.au'. The AIFF and the newer variant AIFC from the Apple/SGI world store their samples in bigendian format (msb,lsb). In AIFC no compression is used. Finally the easiest 'format', the cdr aka raw format. It is done per default in msb,lsb byte order to satisfy the order wanted by most cd writers. Since there is no header information in this format, the sample parameters can only be identified by playing the samples on a soundcard or similiar. The default filename extension is '.cdr' or '.raw'.
Select cdrom drive reading speed
-S speed allows to switch the cdrom drive to a certain level of speed in order to reduce read errors. The argument is transfered verbatim to the drive. Details depend very much on the cdrom drives. An argument of 0 for example is often the default speed of the drive, a value of 1 often selects single speed.
Enable MD5 checksums
-M count enables calculation of MD-5 checksum for 'count' bytes from the beginning of a track. This was introduced for quick comparisons of tracks.
Use Monty's libparanoia for reading of sectors
-paranoia selects an alternate way of extracting audio sectors. Monty's library is used with the following default options:

PARANOIA_MODE_FULL, but without PARANOIA_MODE_NEVERSKIP

for details see Monty's libparanoia documentation. In this case the option -P has no effect.

Do linear or overlapping reading of sectors
(This applies unless option -paranoia is used.) -P sectors sets the given number of sectors for initial overlap sampling for jitter correction. Two cases are to be distinguished. For nonzero values, some sectors are read twice to enable cdda2wav's jitter correction. If an argument of zero is given, no overlap sampling will be used. For nonzero overlap sectors cdda2wav dynamically adjusts the setting during sampling (like cdparanoia does). If no match can be found, cdda2wav retries the read with an increased overlap. If the amount of jitter is lower than the current overlapped samples, cdda2wav reduces the overlap setting, resulting in a higher reading speed. The argument given has to be lower than the total number of sectors per request (see option -n below). Cdda2wav will check this setting and issues a error message otherwise. The case of zero sectors is nice on low load situations or errorfree (perfect) cdrom drives and perfect (not scratched) audio cds.
Set the transfer size
-n sectors will set the transfer size to the specified sectors per request.
Set number of ring buffer elements
-l buffers will allocate the specified number of ring buffer elements.
Set endianess of input samples
-C endianess will override the default settings of the input format. Endianess can be set explicitly to "little" or "big" or to the automatic endianess detection based on voting with "guess".
Set endianess of output samples
-E endianess (endianess can be "little" or "big") will override the default settings of the output format.
Verbose option
-v itemlist prints more information. A list allows selection of different information items.

disable keeps quiet

toc displays the table of contents

summary displays a summary of recording parameters

indices invokes the index scanner and displays start positions of indices

catalog retrieves and displays a media catalog number

trackid retrieves and displays international standard recording codes

sectors displays track start positions in absolute sector notation

To combine several requests just list the suboptions seperated with commas.

The table of contents
The display will show the table of contents with number of tracks and total time (displayed in mm:ss.hh format, mm=minutes, ss=seconds, hh=rounded 1/100 seconds). The following list displays track number and track time for each entry. The summary gives a line per track describing the type of the track.

track preemphasis copypermitted tracktype chans

The track column holds the track number. preemphasis shows if that track has been given a non linear frequency response. NOTE: You can undo this effect with the -T option. copy-permitted indicates if this track is allowed to copy. tracktype can be data or audio. On multimedia CDs (except hidden track CDs) both of them should be present. channels is defined for audio tracks only. There can be two or four channels.

No file output
-N this debugging option switches off writing to a file.
No infofile generation
-H this option switches off creation of an info file and a cddb file.
Generation of simple output for gui frontends
-g this option switches on simple line formatting, which is needed to support gui frontends (like xcd-roast).
Verbose SCSI logging
-V this option switches on logging of SCSI commands. This will produce a lot of output (when SCSI devices are being used). This is needed for debugging purposes. The format is the same as being used with the cdrecord program from Joerg Schilling. I will not describe it here.
Quiet option
-q suppresses all screen output except error messages. That reduces cpu time resources.
Just show information option
-J does not write a file, it only prints information about the disc (depending on the -v option). This is just for information purposes.

CDDBP support

Lookup album and track titles option
-L cddbp mode Cdda2wav tries to retrieve performer, album-, and track titles from a cddbp server. The default server right now is 'freedb.freedb.org'. It is planned to have more control over the server handling later. The parameter defines how multiple entries are handled:

0      interactive mode, the user chooses one of the entries.

1      take the first entry without asking.

Set server for title lookups
cddbp-server servername When using -L or --cddb, the server being contacted can be set with this option.
Set portnumber for title lookups
cddbp-port portnumber When using -L or --cddb, the server port being contacted can be set with this option.

HINTS ON USAGE

Don't create samples you cannot read. First check your sample player software and sound card hardware. I experienced problems with very low sample rates (stereo <= 1575 Hz, mono <= 3675 Hz) when trying to play them with standard WAV players for sound blaster (maybe they are not legal in WAV format). Most CD-Writers insist on audio samples in a bigendian format. Now cdda2wav supports the -E endianess option to control the endianess of the written samples.

If your hardware is fast enough to run cdda2wav uninterrupted and your CD drive is one of the 'perfect' ones, you will gain speed when switching all overlap sampling off with the -P 0 option. Further fine tuning can be done with the -n sectors option. You can specify how much sectors should be requested in one go.

Cdda2wav supports pipes now. Use a filename of - to let cdda2wav output its samples to standard output.

Conversion to other sound formats can be done using the sox program package (although the use of sox -x to change the byte order of samples should be no more necessary; see option -E to change the output byteorder).

If you want to sample more than one track into different files in one run, this is currently possible with the -B option. When recording time exceeds the track limit a new file will be opened for the next track.

FILES

Cdda2wav can generate a lot of files for various purposes.

Audio files:

There are audio files containing samples with default extensions These files are not generated when option (-N) is given. Multiple files may be written when the bulk copy option (-B) is used. Individual file names can be given as arguments. If the number of file names given is sufficient to cover all included audio tracks, the file names will be used verbatim. Otherwise, if there are less file names than files needed to write the included tracks, the part of the file name before the extension is extended with '_dd' where dd represents the current track number.

Cddb and Cdindex files:

If cdda2wav detects cd-extra or cd-text (album/track) title information, then .cddb and .cdindex files are generated unless suppressed by the option -H. They contain suitable formatted entries for submission to audio cd track title databases in the internet. The CDINDEX and CDDB(tm) systems are currently supported. For more information please visit www.musicbrainz.org and www.freedb.com.

Inf files:

The inf files are describing the sample files and the part from the audio cd, it was taken from. They are a means to transfer information to a cd burning program like cdrecord. For example, if the original audio cd had pre-emphasis enabled, and cdda2wav -T did remove the pre-emphasis, then the inf file has pre-emphasis not set (since the audio file does not have it anymore), while the .cddb and the .cdindex have pre-emphasis set as the original does.

WARNING

IMPORTANT: it is prohibited to sell copies of copyrighted material by noncopyright holders. This program may not be used to circumvent copyrights. The user acknowledges this constraint when using the software.

BUGS

Generation of md5 checksums is currently broken.

Performance may not be optimal on slower systems.

The index scanner may give timeouts.

The resampling (rate conversion code) uses polynomial interpolation, which is not optimal.

Cdda2wav should use threads.

Cdda2wav currently cannot sample hidden audio tracks (track 1 index 0).

ACKNOWLEDGEMENTS

Thanks goto Project MODE (http://www.mode.net/) and Fraunhofer Institut fuer integrierte Schaltungen (FhG-IIS) (http://www.iis.fhg.de/) for financial support. Plextor Europe and Ricoh Japan provided cdrom disk drives and cd burners which helped a lot to develop this software. Rammi has helped a lot with the debugging and showed a lot of stamina when hearing 100 times the first 16 seconds of the first track of the Krupps CD. Libparanoia contributed by Monty (Christopher Montgomery) xiphmont@mit.edu.

AUTHOR

Heiko Eissfeldt heiko@colossus.escape.de

DATE

11 Sep 2002

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
ENVIRONMENT VARIABLES
RETURN VALUES
DISCUSSION
HINTS ON OPTIONS
CDDBP support
HINTS ON USAGE
FILES
WARNING
BUGS
ACKNOWLEDGEMENTS
AUTHOR
DATE
This document was created by man2html, using the manual pages.
Time: GMT, June 24, 2004


Manpage of READCD

READCD

Section: Schily\'s USER COMMANDS (1)
Updated: Version 2.0
Index Return to Main Contents

NAME

readcd - read or write data Compact Discs

SYNOPSIS

readcd dev=device [ options ]

DESCRIPTION

Readcd is used to read or write Compact Discs.

The device refers to scsibus/target/lun of the drive. Communication on SunOS is done with the SCSI general driver scg. Other operating systems are using a library simulation of this driver. Possible syntax is: dev= scsibus,target,lun or dev= target,lun. In the latter case, the drive has to be connected to the default SCSI bus of the machine. Scsibus, target and lun are integer numbers. Some operating systems or SCSI transport implementations may require to specify a filename in addition. In this case the correct syntax for the device is: dev= devicename:scsibus,target,lun or dev= devicename:target,lun. If the name of the device node that has been specified on such a system refers to exactly one SCSI device, a shorthand in the form dev= devicename:@ or dev= devicename:@,lun may be used instead of dev= devicename:scsibus,target,lun.

To access remote SCSI devices, you need to prepend the SCSI device name by a remote device indicator. The remote device indicator is either REMOTE:user@host: or .BIREMOTE:host:
A valid remote SCSI device name may be: REMOTE:user@host: to allow remote SCSI bus scanning or REMOTE:user@host:1,0,0 to access the SCSI device at host connected to SCSI bus # 1,target 0 lun 0.

To access SCSI devices via alternate transport layers, you need to prepend the SCSI device name by a transport layer indicator. The transport layer indicator may be something like USCSI: or ATAPI:. To get a list of supported transport layers for your platform, use dev= HELP:

To make readcd portable to all UNIX platforms, the syntax dev= devicename:scsibus,target,lun is preferred as is hides OS specific knowledge about device names from the user. A specific OS must not necessarily support a way to specify a real device file name nor a way to specify scsibus,target,lun.

Scsibus 0 is the default SCSI bus on the machine. Watch the boot messages for more information or look into /var/adm/messages for more information about the SCSI configuration of your machine. If you have problems to figure out what values for scsibus,target,lun should be used, try the -scanbus option of cdrecord.

OPTIONS

If no options except the dev= option have been specified, readcd goes into interactive mode. Select a primary function and then follow the instructions.

-version
Print version information and exit.
dev=target
Sets the SCSI target for the drive, see notes above. A typical device specification is dev=6,0 . If a filename must be provided together with the numerical target specification, the filename is implementation specific. The correct filename in this case can be found in the system specific manuals of the target operating system. On a FreeBSD system without CAM support, you need to use the control device (e.g. /dev/rcd0.ctl). A correct device specification in this case may be dev=/dev/rcd0.ctl:@ .

On Linux, drives connected to a parallel port adapter are mapped to a virtual SCSI bus. Different adapters are mapped to different targets on this virtual SCSI bus.

If no dev option is present, cdrecord will try to get the device from the CDR_DEVICE environment.

If the argument to the dev= option does not contain the characters ',', '/', '@' or ':', it is interpreted as an label name that may be found in the file /etc/default/cdrecord (see FILES section).

timeout=#
Set the default SCSI command timeout value to # seconds. The default SCSI command timeout is the minimum timeout used for sending SCSI commands. If a SCSI command fails due to a timeout, you may try to raise the default SCSI command timeout above the timeout value of the failed command. If the command runs correctly with a raised command timeout, please report the better timeout value and the corresponding command to the author of the program. If no timeout option is present, a default timeout of 40 seconds is used.
debug=#, -d
Set the misc debug value to # (with debug=#) or increment the misc debug level by one (with -d). If you specify -dd, this equals to debug=2. This may help to find problems while opening a driver for libscg. as well as with sector sizes and sector types. Using -debug slows down the process and may be the reason for a buffer underrun.
kdebug=#, kd=#
Tell the scg-driver to modify the kernel debug value while SCSI commands are running.
-silent, -s
Do not print out a status report for failed SCSI commands.
-v
Increment the level of general verbosity by one. This is used e.g. to display the progress of the process.
-V
Increment the verbose level with respect of SCSI command transport by one. This helps to debug problems during the process, that occur in the CD-Recorder. If you get incomprehensible error messages you should use this flag to get more detailed output. -VV will show data buffer content in addition. Using -V or -VV slows down the process.
f=file
Specify the filename where the output should be written or the inout should be taken from. Using '-' as filename will cause readcd to use stdout resp. stdin.
-w
Switch to write mode. If this option is not present, readcd reads from the specified device.
-c2scan
Scans the whole CD or the range specified by the sectors=range for C2 errors. C2 errors are errors that are uncorrectable after the second stage of the 24/28 + 28/32 Reed Solomon correction system at audio level (2352 bytes sector size). If an audio CD has C2 errors, interpolation is needed to hide the errors. If a data CD has C2 errors, these errors are in most cases corrected by the ECC/EDC code that makes 2352 bytes out of 2048 data bytes. The ECC/EDC code should be able to correct about 100 C2 error bytes per sector.

If you find C2 errors you may want to reduce the speed using the speed= option as C2 errors may be a result of dynamic unbalance on the medium.

-scanbus
Scan all SCSI devices on all SCSI busses and print the inquiry strings. This option may be used to find SCSI address of the devices on a system. The numbers printed out as labels are computed by: bus * 100 + target
sectors=range
Specify a sector range that should be read. The range is specified by the starting sector number, a minus sign and the ending sector number. The end sector is not included in the list, so sectors=0-0 will not read anything and may be used to check for a CD in the drive.
speed=#
Set the speed factor of the read or write process to #. # is an integer, representing a multiple of the audio speed. This is about 150 KB/s for CD-ROM and about 172 KB/s for CD-Audio. If no speed option is present, readcd will use maximum speed. Only MMC compliant drives will benefit from this option. The speed of non MMC drives is not changed.

Using a lower speed may increase the readability of a CD or DVD.

ts=#
Set the maximum transfer size for a single SCSI command to #. The syntax for the ts= option is the same as for cdrecord fs=# or sdd bs=#.

If no ts= option has been specified, readcd defaults to a transfer size of 256 kB. If libscg gets lower values from the operating system, the value is reduced to the maimum value that is possible with the current operating system. Sometimes, it may help to further reduce the transfer size or to enhance it, but note that it may take a long time to find a better value by experimenting with the ts= option.

-notrunc
Do not truncate the output file when opening it.
-fulltoc
Retrieve a full TOC from the current disk and print it in hex.
-clone
Do a clone read. Read the CD with all sub-channel data and a full TOC. The full TOC data will be put into a file with similar name as with the f= option but the suffix .toc added.
-noerror
Do not abort if the high level error checking in readcd found an uncorrectable error in the data stream.
-nocorr
Switch the drive into a mode where it ignores read errors in data sectors that are a result of uncorrectable ECC/EDC errors before reading. If readcd completes, the error recovery mode of the drive is switched back to the remembered old mode.
retries=#
Set the retry count for high level retries in readcd to #. The default is to do 128 retries which may be too much if you like to read a CD with many unreadable sectors.
-overhead
Meter the SCSI command overhead time. This is done by executing several commands 1000 times and printing the total time used. If you divide the displayed times by 1000, you get the average overhead time for a single command.
meshpoints=#
Print read-speed at # locations. The purpose of this option is to create a list of read speed values suitable for e.g. gnuplot. The speed values are calculated assuming that 1000 bytes are one kilobyte as documented in the SCSI standard. The ouput data created for this purpose is written to stdout.
-factor
Output the speed values for meshpoints=# as factor based on single speed of the current medium. This only works if readcd is able to determine the current medium type.

EXAMPLES

For all examples below, it will be assumed that the drive is connected to the primary SCSI bus of the machine. The SCSI target id is set to 2.

To read the complete media from a CD-ROM writing the data to the file cdimage.raw:

readcd dev=2,0 f=cdimage.raw

To read sectors from range 150 ... 10000 from a CD-ROM writing the data to the file cdimage.raw:

readcd dev=2,0 sectors=150-10000 f=cdimage.raw

To write the data from the file cdimage.raw (e.g. a filesystem image from mkisofs) to a DVD-RAM, call:

readcd dev=2,0 -w f=cdimage.raw

ENVIRONMENT

RSH
If the RSH environment is present, the remote connection will not be created via rcmd(3) but by calling the program pointed to by RSH. Use e.g. RSH=/usr/bin/ssh to create a secure shell connection.

Note that this forces cdrecord to create a pipe to the rsh(1) program and disallows cdrecord to directly access the network socket to the remote server. This makes it impossible to set up performance parameters and slows down the connection compared to a root initiated rcmd(3) connection.

RSCSI
If the RSCSI environment is present, the remote SCSI server will not be the program /opt/schily/sbin/rscsi but the program pointed to by RSCSI. Note that the remote SCSI server program name will be ignored if you log in using an account that has been created with a remote SCSI server program as login shell.

FILES

SEE ALSO

cdrecord(1), mkisofs(1), scg(7), fbk(7), rcmd(3), ssh(1).

NOTES

If you don't want to allow users to become root on your system, readcd may safely be installed suid root. This allows all users or a group of users with no root privileges to use readcd. Readcd in this case will only allow access to CD-ROM type drives- To give all user access to use readcd, enter:

       chown root /usr/local/bin/readcd

       chmod 4711 /usr/local/bin/readcd

To give a restricted group of users access to readcd enter:

       chown root /usr/local/bin/readcd

       chgrp cdburners /usr/local/bin/readcd

       chmod 4710 /usr/local/bin/readcd

and add a group cdburners on your system.

Never give write permissions for non root users to the /dev/scg? devices unless you would allow anybody to read/write/format all your disks.

You should not connect old drives that do not support disconnect/reconnect to either the SCSI bus that is connected to the CD-Recorder or the source disk.

When using readcd with the broken Linux SCSI generic driver. You should note that readcd uses a hack, that tries to emulate the functionality of the scg driver. Unfortunately, the sg driver on Linux has several severe bugs:

*
It cannot see if a SCSI command could not be sent at all.
*
It cannot get the SCSI status byte. Readcd for that reason cannot report failing SCSI commands in some situations.
*
It cannot get real DMA count of transfer. Readcd cannot tell you if there is an DMA residual count.
*
It cannot get number of bytes valid in auto sense data. Readcd cannot tell you if device transfers no sense data at all.
*
It fetches to few data in auto request sense (CCS/SCSI-2/SCSI-3 needs >= 18).

DIAGNOSTICS

A typical error message for a SCSI command looks like:

readcd: I/O error. test unit ready: scsi sendcmd: no error
CDB:  00 20 00 00 00 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 25 00 00 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x25 Qual 0x00 (logical unit not supported) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.002s timeout 40s

The first line gives information about the transport of the command. The text after the first colon gives the error text for the system call from the view of the kernel. It usually is: I/O error unless other problems happen. The next words contain a short description for the SCSI command that fails. The rest of the line tells you if there were any problems for the transport of the command over the SCSI bus. fatal error means that it was not possible to transport the command (i.e. no device present at the requested SCSI address).

The second line prints the SCSI command descriptor block for the failed command.

The third line gives information on the SCSI status code returned by the command, if the transport of the command succeeds. This is error information from the SCSI device.

The fourth line is a hex dump of the auto request sense information for the command.

The fifth line is the error text for the sense key if available, followed by the segment number that is only valid if the command was a copy command. If the error message is not directly related to the current command, the text deferred error is appended.

The sixth line is the error text for the sense code and the sense qualifier if available. If the type of the device is known, the sense data is decoded from tables in scsierrs.c . The text is followed by the error value for a field replaceable unit.

The seventh line prints the block number that is related to the failed command and text for several error flags. The block number may not be valid.

The eight line reports the timeout set up for this command and the time that the command really needed to complete.

BUGS

CREDITS

MAILING LISTS

If you want to actively take part on the development of cdrecord, you may join the cdwriting mailing list by sending mail to:

        other-cdwrite-request@lists.debian.org
and include the word subscribe in the body. The mail address of the list is:

        cdwrite@lists.debian.org

AUTHOR

Joerg Schilling
Seestr. 110
D-13353 Berlin
Germany

Additional information can be found on:
http://www.fokus.fhg.de/usr/schilling/cdrecord.html

If you have support questions, send them to:

cdrecord-support@berlios.de
or other-cdwrite@lists.debian.org

If you have definitely found a bug, send a mail to:

cdrecord-developers@berlios.de
or schilling@fokus.fhg.de

To subscribe, use:

http://lists.berlios.de/mailman/listinfo/cdrecord-developers
or http://lists.berlios.de/mailman/listinfo/cdrecord-support

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXAMPLES
ENVIRONMENT
FILES
SEE ALSO
NOTES
DIAGNOSTICS
BUGS
CREDITS
MAILING LISTS
AUTHOR
This document was created by man2html, using the manual pages.
Time: GMT, June 24, 2004


Manpage of ISOINFO

ISOINFO

Section: Maintenance Commands (8)
Updated: 04/06/01
Index Return to Main Contents

NAME

devdump, isoinfo, isovfy, isodump - Utility programs for dumping and verifying iso9660 images.

SYNOPSIS

devdump isoimage

isodump isoimage

isoinfo [ -d ] [ -h ] [ -R ] [ -J ] [ -j charset ] [ -f ] [ -l ] [ -p ] [ -T sector ] [ -N sector ] [ -i isoimage ] [ -x path ]

isovfy isoimage

DESCRIPTION

devdump is a crude utility to interactively display the contents of device or filesystem images. The initial screen is a display of the first 256 bytes of the first 2048 byte sector. The commands are the same as with isodump.

isodump is a crude utility to interactively display the contents of iso9660 images in order to verify directory integrity. The initial screen is a display of the first part of the root directory, and the prompt shows you the extent number and offset in the extent.

You can use the 'a' and 'b' commands to move backwards and forwards within the image. The 'g' command allows you to goto an arbitrary extent, and the 'f' command specifies a search string to be used. The '+' command searches forward for the next instance of the search string, and the 'q' command exits devdump or isodump.

isoinfo is a utility to perform directory like listings of iso9660 images.

isovfy is a utility to verify the integrity of an iso9660 image. Most of the tests in isovfy were added after bugs were discovered in early versions of mkisofs. It isn't all that clear how useful this is anymore, but it doesn't hurt to have this around.

OPTIONS

The options common to all programs are -help,-h,-version, i=name,dev=name. The isoinfo program has additional command line options. The options are:
-help
-h
print a summary of all options.
-d
Print information from the primary volume descriptor (PVD) of the iso9660 image. This includes information about Rock Ridge, Joliet extensions and Eltorito boot information if present.
-f
generate output as if a 'find . -print' command had been run on the iso9660 image. You should not use the -l image with the -f option.
-i iso_image
Specifies the path of the iso9660 image that we wish to examine. The options -i and dev=target are mutual exclusive.
dev=target
Sets the SCSI target for the drive, see notes above. A typical device specification is dev=6,0 . If a filename must be provided together with the numerical target specification, the filename is implementation specific. The correct filename in this case can be found in the system specific manuals of the target operating system. On a FreeBSD system without CAM support, you need to use the control device (e.g. /dev/rcd0.ctl). A correct device specification in this case may be dev=/dev/rcd0.ctl:@ .

On Linux, drives connected to a parallel port adapter are mapped to a virtual SCSI bus. Different adapters are mapped to different targets on this virtual SCSI bus.

If no dev option is present, the program will try to get the device from the CDR_DEVICE environment.

If the argument to the dev= option does not contain the characters ',', '/', '@' or ':', it is interpreted as an label name that may be found in the file /etc/default/cdrecord (see FILES section).

The options -i and dev=target are mutual exclusive.

-l
generate output as if a 'ls -lR' command had been run on the iso9660 image. You should not use the -f image with the -l option.
-N sector
Quick hack to help examine single session disc files that are to be written to a multi-session disc. The sector number specified is the sector number at which the iso9660 image should be written when send to the cd-writer. Not used for the first session on the disc.
-p
Print path table information.
-R
Extract information from Rock Ridge extensions (if present) for permissions, file names and ownerships.
-J
Extract information from Joliet extensions (if present) for file names.
-j charset
Convert Joliet file names (if present) to the supplied charset. See mkisofs(8) for details.
-T sector
Quick hack to help examine multi-session images that have already been burned to a multi-session disc. The sector number specified is the sector number for the start of the session we wish to display.
-x pathname
Extract specified file to stdout.

AUTHOR

The author of the original sources (1993 ... 1998) is Eric Youngdale <ericy@gnu.ai.mit.edu> or <eric@andante.jic.com> is to blame for these shoddy hacks. Joerg Schilling wrote the SCSI transport library and it's adaptation layer to the programs and newer parts (starting from 1999) of the utilities, this makes them Copyright (C) 1999-2004 Joerg Schilling. Patches to improve general usability would be gladly accepted.

BUGS

The user interface really sucks.

FUTURE IMPROVEMENTS

These utilities are really quick hacks, which are very useful for debugging problems in mkisofs or in an iso9660 filesystem. In the long run, it would be nice to have a daemon that would NFS export a iso9660 image.

The isoinfo program is probably the program that is of the most use to the general user.

AVAILABILITY

These utilities come with the cdrtools package, and the primary ftp site is ftp.berlios.de in /pub/cdrecord and many other mirror sites. Despite the name, the software is not beta.

ENVIRONMENT

CDR_DEVICE
This may either hold a device identifier that is suitable to the open call of the SCSI transport library or a label in the file /etc/default/cdrecord.
RSH
If the RSH environment is present, the remote connection will not be created via rcmd(3) but by calling the program pointed to by RSH. Use e.g. RSH=/usr/bin/ssh to create a secure shell connection.

Note that this forces the program to create a pipe to the rsh(1) program and disallows the program to directly access the network socket to the remote server. This makes it impossible to set up performance parameters and slows down the connection compared to a root initiated rcmd(3) connection.

RSCSI
If the RSCSI environment is present, the remote SCSI server will not be the program /opt/schily/sbin/rscsi but the program pointed to by RSCSI. Note that the remote SCSI server program name will be ignored if you log in using an account that has been created with a remote SCSI server program as login shell.

FILES

/etc/default/cdrecord
Default values can be set for the following options in /etc/default/cdrecord.
CDR_DEVICE
This may either hold a device identifier that is suitable to the open call of the SCSI transport library or a label in the file /etc/default/cdrecord that allows to identify a specific drive on the system.
Any other label
is an identifier for a specific drive on the system. Such an identifier may not contain the characters ',', '/', '@' or ':'.

Each line that follows a label contains a TAB separated list of items. Currently, four items are recognized: the SCSI ID of the drive, the default speed that should be used for this drive, the default FIFO size that should be used for this drive and drive specific options. The values for speed and fifosize may be set to -1 to tell the program to use the global defaults. The value for driveropts may be set to "" if no driveropts are used. A typical line may look this way:

teac1= 0,5,0   4       8m      ""

yamaha= 1,6,0  -1      -1      burnfree

This tells the program that a drive named teac1 is at scsibus 0, target 5, lun 0 and should be used with speed 4 and a FIFO size of 8 MB. A second drive may be found at scsibus 1, target 6, lun 0 and uses the default speed and the default FIFO size.

SEE ALSO

mkisofs(8), cdrecord(1), readcd(1), scg(7), rcmd(3), ssh(1).

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
AUTHOR
BUGS
FUTURE IMPROVEMENTS
AVAILABILITY
ENVIRONMENT
FILES
SEE ALSO
This document was created by man2html, using the manual pages.
Time: GMT, June 24, 2004


# @(#)README	1.25 02/12/25 Copyright 1996-2002 J. Schilling

This is Version 2.0 of cdrecord

Cdrecord allows you to create CD's on a CD-Recorder.
Cdrecord runs on:

SunOS 4.1.3 or later:	m68k sparc
Solaris 2.3 or later:	sparc x86 ppc.

Linux:			alpha x86 IA-64 m68k mips mipsel parisc parisc64 ppc s390 sparc sparc64 strongarm

FreeBSD:		alpha arm IA-64 powerpc sparc sparc64 x86 x86-64
NetBSD:			alpha amiga x86 m68k sparc
OpenBSD:		x86

AIX:			rs6000
AmigaOS			m68k
Apollo Domain/OS	m68k ???
Apple Rhapsody:		ppc, x86
Apple MacOS X:		ppc
Apple Darwin:		ppc
BeOS:			m68k x86
BSD/OS (BSDi):		sparc x86
Caldera OpenUnix:	x86
HP-UX:			hppa
GNU HURD:		x86
NeXt Step:		mc68xxx x86 and hppa
OS/2:			x86
OSF1:			alpha
SCO Openserver 5.x:	x86
SCO Unixware 2.x:	x86
SCO Unixware 7.x:	x86
SGI IRIX:		mips
Win95:			x86
Win98:			x86
WinME:			x86
WinNT:			x86
WinNT-5 (aka Win2000):	x86
WinNT-5.1 (aka WinXP):	x86
VMS:			*VAX alpha
QNX:			x86 (coming soon)

To learn how to compile and install cdrecord, read README.compile

To compile on currently unknown platforms you definitely need 'smake'
from ftp.berlios.de/pub/smake or ftp.berlios.de/pub/smake
GNUmake is too dump to do this job as it does not include automake features
like 'smake' does.

For multi session please read README.multi

In general, it is a good idea to read all README's and check whether
they may apply for your needs/problems.

Cdrecord runs without problems on a loaded Solaris system.
On Solaris, cdrecord uses the SVr4 priocntl() call to establish
SVr4 real-time scheduling which grants to run cdrecord in a even higher
priority than all kernel processes. On system that provide POSIX real-time
scheduling the result may be slightly worse as not all POSIX RT implementations
grant decent real time behaviour.

The cdrtools distribution contains a SCSI user level transport library
called libscg. The SCSI library is suitable to talk to any SCSI device without
having a special device specific driver for it.
Cdrecord may be easily ported to any system that has a generic SCSI device
driver similar to the scg driver.

On SunOS/Solaris:
You *need* the SCSI general driver 'scg' in order to run cdrecord.

SunOS 4.1.3 only:
    The 'scg' driver is Copyright 1986-1995 Jцrg Schilling,
    it is supplied binary in a loadable format.
    There is no future support, there is no non loadable support.

Solaris only:
    The 'scg' driver is Copyright 1986-1995 Jцrg Schilling,
    it is supplied binary in pkgadd(1m) format and is tested
    on Solaris 2.3, Solaris 2.4 & Solaris 2.5 (sparc).

Solaris only:
    It is _nice to have_ the 'fbk' driver to mount files that contain
    images of file systems. Fbk means File simulates Block Device.

    The 'fbk' driver is Copyright 1988-1995 Jцrg Schilling,
    it is supplied binary in pkgadd(1m) format and is tested
    on Solaris 2.3, Solaris 2.4 & Solaris 2.5 (sparc).

On other OS, libscg uses the SCSI drivers that are present on the system.

Cdrecord-1.3 or later adopts the right BUF_SIZE for each architecture.
This is to reduce some performance problems on Solaris x86.
It may be that the reason for this performance problems is that
the PC-architecture has no IO-MMU and therefore is not able to do DVMA.
If this points out to be the reason, I have to
change the scg driver & cdrecord, but this would
be needed on Linux anyway.

Cdrecord is currently maintained with the following drives:

    Plextor PX-W4824A
    Plextor PX-W4012A
    Plextor PX-W2410A
    Plextor PX-W1210S
    Plextor PX-W1210A
    Plextor PX-W124
    Plextor PX-W8220
    Plextor PX-W4220
    Plextor PX-R820
    Plextor PX-R412C
    Yamaha F-1
    Yamaha CRW-2200S
    Yamaha CRW-2200A
    Yamaha CRW-2100S
    Yamaha CRW-4416
    Yamaha CDR-400
    Ricoh MP-7040A
    Ricoh MP-7040S
    Ricoh MP-7060S (available only to Thomas Niederreiter and Heiko EiЯfeld)
    Ricoh MP-7063A
    Ricoh MP-7080A
    Ricoh MP-7083A
    Ricoh MP-9060A
    Ricoh MP-7163A
    Ricoh DVD+RW MP5125	(DVD+ writing not yet supported)
    HP DVD-200i		(DVD+ writing not yet supported)
    Philips DVD-RW 1208	(DVD+ writing not yet supported)
    TEAC CD-R55S
    TEAC CD-R58S
    TEAC CD-W54E
    TEAC CD-W28E
    Sanyo CDR-Bp2
    Sanyo CDR-Bp3A
    Sony CDU948S
    Sony CRX-145E
    Sony CRX-200E		(DDCD writing not supported)
    COMPRO/Matsushita/Panasonic CW-7502
    COMPRO/Matsushita/Panasonic CW-7586
    Philips CDD-2000
    Philips PCRW-804
    Goldstar LG 8080
    AOPEN CRW-4048
    Cyberdrive CW-038D
    Cyberdrive CW-078D
    Pioneer DVD-R A03

It should run also on:

    All SCSI-3/mmc compliant drives
    All ATAPI/mmc compliant drives

    NOTE:

    It seems that all drives that have been initially released in 1999
    or later are MMC compliant. If a recent drive does not work with
    cdrecord, you most likely found a firmware bug in this drive.
    Contact your drive vendor in this case.

Drives that have been reported to work or should work because
Andy MCFadden (see also http://www.fadden.com/cdrfaq/faq05.html) listed
them to be identical to working drives. Note that this list may be outdated

    ACER CR-1420C
    ACER CDRW 6206A
    AOPEN CRW9420 (Re-writable)
    BTC BCE 621E
    COMPRO CW-7502
    COMPRO/Matsushita/Panasonic CW-7586
    Dysan CR-622 ???? See Wearnes 622
    Dysan CR-1622
    DynaTec CDM-240J (see Pinnacle RCD-4x4)
    DynaTec CDM-240  (use cdrecord driver=yamaha_cdr100 and report inquiry)
    DynaTec CDM-400  (use cdrecord driver=yamaha_cdr100 and report inquiry)
    Grundig CDR-100
    Hewlett Packard 4020i
    Hewlett Packard 6020i
    HP C4324/C4325 (HP SureStore 4020i/6020i)
    HP 7100
    HP 7110
    HP 7200
    HP 8100
    HP 8210
    HP CD-Writer+ M820
    Hi-Val CD-R (see Pinnacle RCD-4x4)
    IMATION CD-RW IMW040420
    JVC XR-W2001 (uses TEAC code - see below - audio not working)
    JVC XR-W2010 (uses TEAC code - see below - audio not working)
    JVC XR-W2020 (uses TEAC code - see below - audio not working)
    JVC XR-W2080 (first MMC drive from JVC)
    Kodak PCD-200 or Kodak PCD-200 Plus
    Kodak PCD-225
    Kodak PCD-240
    Kodak PCD-600
    Matsushita CW-7502
    Matsushita CW-7503
    Matsushita CW-7582
    Matsushita CW-7586
    Memorex CR-622 ???? See Wearnes 622
    Memorex CR-1622
    Memorex CRW-1622
    Microboards PlayWrite 2000 (use cdrecord driver=sony_cdu924 and report inquiry)
    Microboards PlayWrite 4000 (use cdrecord driver=yamaha_cdr100 and report inquiry)
    Microboards PlayWrite 4001RW
    MicroNet MasterCD Plus 4x4 (use cdrecord driver=yamaha_cdr100 and report inquiry)
    MicroNet MasterCD Plus 4x6
    Mitsubishi MCA-CDRW 226
    Mitsumi CR-2401-TS
    Mitsumi CR-2600-TE
    Mitsumi CR-2801-TE
    Mitsumi CR-4801-TE
    Mitsumi CR-4802-TE ???
    Nomai 680.rw
    Olympus CDS615E
    Olympus CDS620E (use cdrecord driver=sony_cdu924   and report inquiry)
    Olympus CD-R2x6 (use cdrecord driver=sony_cdu924   and report inquiry)
    Optima Dis Kovery 650 CD-R
    OTI CDRW 965
    OTI-975 Socrates 1.0 (CDRW)
    Panasonic CW-7502
    Panasonic CW-7503
    Panasonic CW-7582
    Panasonic CW-7586
    Philips CDD 521 (CDD521/02  Revision: 2.06 has bad firmware - seems not to work)
    Philips CDD 521 (upgraded units only: ID: CDD521/10  Revision: 2.07)
    Philips CDD 522
    Philips CDD 2000
    Philips CDD 2600
    Philips CDD 3600
    Philips CDD 3610
    Philips CDRW400
    Philips Omniwriter 26
    Philips Omniwriter 26A
    Philips CDD4201 CD-RW
    Philips PCRW-804
    Pinnacle Micro RCD-1000 (see TEAC/JVC): Need to upgrade firmware to 2.35
    Pinnacle Micro RCD-5020 (see TEAC/JVC - audio not working)
    Pinnacle Micro RCD-5040 (see TEAC/JVC - audio not working)
    Pinnacle Micro RCD-4x4
    Pioneer DW-S114X
    Plasmon CDR 4220
    Plasmon RF-4100
    Plasmon RF-4102
    Plasmon CDR 4400 (use cdrecord driver=yamaha_cdr100 and report inquiry)
    Plasmon CDR 480
    Plextor PX-R24CS (use cdrecord driver=ricoh_ro1420c and report inquiry)
    Plextor PX-R412C
    Plextor PX-R820
    Plextor PX-W4220
    Plextor PX-W8220
    Plextor PX-W124
    Plextor PX-W1210S
    Plextor PX-W1210A
    Procom PCDR 4 (use cdrecord driver=yamaha_cdr100 and report inquiry)
    Ricoh RO-1420C
    Ricoh MP-6200
    Ricoh MP-6200I
    Ricoh MP-6201
    Ricoh MP-7040A
    Ricoh MP-7040S
    Ricoh MP-7060S
    Ricoh MP-7063A
    Ricoh MP-7080A
    Ricoh MP-7083A
    Ricoh MP-9060A
    Sanyo CDR-Bp2
    Sanyo CDR-Bp3
    Smart & Friendly CD-R1002 (use cdrecord driver=sony_cdu924   and report inquiry)
    Smart & Friendly CD-R1004 (use cdrecord driver=yamaha_cdr100 and report inquiry)
    Smart & Friendly CD-R2004 (use cdrecord driver=sony_cdu924   and report inquiry)
    Smart & Friendly CD-R2006 PLUS
    Smart & Friendly CD-R2006 PRO
    Smart & Friendly CD-R4000 (use cdrecord driver=yamaha_cdr100 and report inquiry)
    Smart & Friendly CD-R4006
    Smart & Friendly CD-R4012
    Smart & Friendly CD-RW226
    Smart & Friendly CD-R8020
    Sony CDU920S
    Sony CDU924S
    Sony CDU926S
    Sony CDU928S
    Sony CDU940S
    Sony CDU948S
    Sony CRX-100
    Sony CRX-140
    Sony CRX-145
    Taiyo Yuden CD-WO EW-50
    TEAC CD-R50S
    TEAC CD-R55S
    TEAC CD-R56S
    TEAC CD-R58S
    TEAC CD-W54E
    That's Write CDR-N820S
    Traxdata CDRW-2260EL-PRO
    Traxdata CDR-4120
    Traxdata CDRW-4260
    Turtle Beach 2040R (use cdrecord driver=ricoh_ro1420c and report inquiry)
    WAITEK WT2036
    Wearnes CD-R622
    Wearnes CD-R632P
    Yamaha CDR-100
    Yamaha CDR-102
    Yamaha CDR-200
    Yamaha CDR-400(Firmware revision 1.0d and up otherwise upgrade)
    Yamaha CDR-401
    Yamaha CRW-4001
    Yamaha CRW-2260
    Yamaha CRW-2261
    Yamaha CRW-4260
    Yamaha CRW-4261
    Yamaha CRW-4416
    Yamaha CRW-6416
    Yamaha CRW-8424
    Yamaha CRW-2100

Multi-session has not been tested with the Plasmon RF-4100

All companies that support me with SCSI command reference manuals and drives
will get (continued) support in the following releases.

The following drives will never be supported by cdrecord because they are too old:

    JVC XR-W1001
    Pinnacle Micro RCD-202
    Ricoh RS-9200CD

The following drives are currently not supported because I don't get specs:
(some of them may partially work: see above)

    Creative Labs CDR 4210
    JVC XR-W2001
    JVC XR-W2010
    JVC XR-W2020
    Pinnacle Micro RCD-1000
    Pinnacle Micro RCD-5020
    Pinnacle Micro RCD-5040
    Plasmon CDR-4240
    Sony CDW-900E

The following drives may get support soon (If I get time to do so):

    Panasonic CW-7501
    Ricoh RS-1060C

If you understang German, it makes sense to have a look at http://www.dchlb.de/
and http://www.brennmeister.com/ for additional information.

To install get:

Solaris only:
    SCHILYscg.sparc.tar.Z	The scg driver in pkgadd format (sparc).
    SCHILYfbk.sparc.tar.Z	The fbk driver in pkgadd format (sparc).
    SCHILYscg.i386.tar.Z	The scg driver in pkgadd format (x86).
    SCHILYfbk.i386.tar.Z	The fbk driver in pkgadd format (x86).

Note that the fbk driver packet is for Solaris 2.4 and not system independent.

All Systems:
    cdrtools-2.0.tar.gz	The cdrtools for source distribution.

NOTE:	All these tar archives are 100% ansi compatible. Solaris 2.x tar and GNU
    tar may get some minor trouble.

WARNING: Do not use 'mc' to extract the tar file!
    All mc versions before 4.0.14 cannot extract symbolic links correctly.

To unpack the archive use:

        gzip -d < cdrtools-2.0.tar.gz | tar -xpf -

    Replace 'cdrtools-2.0' by the actual archive name.

    If your Platform does not support hard links or symbolic links, you
    first need to compile "star" and then call:

        star -xpz -copy-links < cdrtools-2.0.tar.gz

    If your platform does not support hard links but supports
    symbolic links, you only need to call the command above once.
    If your platform does not support symbolic links, you need to call
    the command twice because a symbolic link may occur in the archive
    before the file it points to.

The files are located on:

ftp://ftp.berlios.de/pub/cdrecord/ ...
ftp://ftp.berlios.de/pub/schily/kernel/scg/ ...
ftp://ftp.berlios.de/pub/schily/kernel/fbk/ ...

Only use the mkisofs that is contained in this release.
All other mkisofs versions are too buggy.

Installation Process:

Solaris only:
    1) scg driver
            untar SCHILYscg.tar:
            su
            Password: xxxxx
            cd /tmp
            zcat SCHILYscg.tar | tar -xvf -
            pkgadd -d .
            reboot -- -r

    2) fbk driver
            similar to scg driver (see above)

    3) Switch the CD-Writer to an unused target id (2 should do it)

NOTE:
    Be very careful. pkgadd does not check for the right target
    architecture. Do not install drivers for intel on sparc
    and vice versa. You will get a corrupt system.

    You need to be root because you need access to /dev/scg? and to be
    able to put cdrecord into the real-time scheduling class.

All Systems:

The SCSI transport library has been taken from the sformat program.
Sformat is the first SCSI disk formatting/analyzing/repairing that runs on
SunOS/Solaris. The first release of sformat has been made for SunOS 3.0
(two years before Sun introduced their format utility). Sformat source
including 10 years of competence in SCSI disk handling is available
on:
    ftp://ftp.berlios.de/pub/sformat

I am interested to hear if someone is interested in a kernel based
filesystem for Solaris that uses packet writing on the CD-Recorder.
The filesystem will create a single session CD that may be finally converted
to a hybrid filesystem that allows to be read as
ISO-9660 with Rock Ridge extensions too.
Please mail suggestions to: wofs@schily.isdn.cs.tu-berlin.de

If you want to use the CD-recorder as CD-ROM device, have a look at

Solaris only:
ftp://ftp.berlios.de/pub/schily/kernel/sd

Current information on cdrecord may be found on:

    http://www.fokus.fhg.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

    Joerg Schilling

    (really Jцrg Schilling if you have ISO-8859-1)

If you have questions mail to:

    HOME: 		joerg@schily.isdn.cs.tu-berlin.de
    UNIVERSITY:	js@cs.tu-berlin.de
    WORK:		schilling@fokus.fhg.de


Cdda2wav User guide
===================

NOTE: expressions in angle braces have to be substituted with
      the corresponding numerical values.
      For example: <delay in seconds> has to be substituted
    with the numerical value to be used.

Common tasks
============
NOTE: The examples used here depend on proper default settings for interface
method and devices as specified in the Makefile. They can be overriden with
command line parameters, but here I choose to focus on simple examples.

Copy complete audio CDs

1. Copy an audio CD into wav files one per track.

    cdda2wav -B

   will produce the sample wav files (one per track)
    audio_01.wav
    audio_02.wav
    ...

   and the corresponding description files
    audio_01.inf
    audio_02.inf
    ...

2. Same as above but include MD-5 type signatures

    cdda2wav -B -M<length>

3. Same as above but use other file name ('party_cd.wav')

    cdda2wav -B -M<length> party_cd.wav

Copy single tracks

1. Copy one track (eg track 6) into a wav file.

    cdda2wav -t6

   will produce a wav file including track 6

    audio.wav

   and

    audio.inf

Copy parts of tracks

1. Copy from given start time to end of track

    cdda2wav -t6 -o<delay in 1/75 seconds>

   will record track 6 starting at track time <delay>/75 seconds
   from track beginning upto the end of track.

2. Copy from given start time and record for a given time

    cdda2wav -t6 -o<delay in 1/75 seconds> -d<time to record in seconds>

   will record track 6 starting at track time <delay>/75 seconds
   from track beginning for <time to record in seconds> seconds.

Copy tracks into a pipe

    cdda2wav -t6 -Oraw - | audio_compressor

   will feed the audio samples (in big endian format) of track 6
   into a secondary program audio_compressor.
(See also script cdda2mp3(.new) for a suggestion, how to process all tracks of
an audio cd with a MPEG-Layer3 encoder (not included here).)

Miscellaneous

1. Use cdda2wav as a cd player

    cdda2wav -eN -t6

   will copy the audio samples into a sound card (if sound card support
   is compiled in) and will not write any file.

2. Get complete information on the cd

    cdda2wav -v63 -Nd0.01

   will try to find out a media catalog number and track related
   information (ISRCs) in addition to indices. For CD-Extra discs
   limited support exists to retrieve additional information.


Why do I hear only noise from my first audio CD?

You may have a byte swapping problem, try cdrecord -swab

Cdrecord assumes Motorola/Network byte order (big-endian) on input
regardless of the byte order of the CD-Recorder. If Cdrecord
encounters a .wav file, byte order is corrected to match the byte order
of the .wav file.

Cdrecord currently only supports Track at once. This gives 2 seconds
pause between two audio tracks.

The 2 seconds pause between two audio tracks is the CD ***standard***

The standard says:
    Each track starts with 2 seconds of silence
    followed by at least 4 seconds of audio data.

For that reason the 2 second pause is generated by the CD-R drive in
Track at once (TAO) mode.

CD's that have no pause between two tracks are illegal (compared to RED BOOK).
These illegal disks may be made with Disk At Once (DAO) only.
In DAO mode the writing software needs to send the 2 seconds pause as
binary zeroes and therefore is able to create illegal disks by
sending audio data instead.

This audio data (the last two seconds of a track in this case)
however are part of the next track from viewing the TOC of the disk.

The new SCSI-3/mmc standard conforming drives
(such as the Yamaha CDR-400, Matsushita CW-7502 ...)
may in future be able to change the 2 second pause even in TAO mode.
Current firmware does not allow to do this, but I expect
that (due to low level limitations) it will not be possible to set
the pause to less than 5 sectors (0.066 seconds). From what I have been
told from a firmware developer, it will most likely not do what
people expect.

You have to wait for DAO unless you own a TEAC drive that allows you
to create a TAO disk with similar properties than a DAO disk.

Joerg Schilling


# @(#)README.win32	1.7 02/12/16 Copyright 2000 J. Schilling

cdrecord-1.8a22 or later can be compiled on Win9X/NT4 using Cygnus' cygwin
which is freely available from:

    http://sourceware.cygnus.com/cygwin/
or
    http://sources.redhat.com/cygwin/

To compile on Cygwin, get Cygwin by executing setup.exe

You will need approx. 120 MB to install a full cygwin developer release.

Get the tar'ed cdrtools source and unpack it with 'gnutar' or 'star',

e.g. Start a bash command line window and type:

    star -xpz < cdrtools-1.10.tar.gz

    don't use winzip to unpack the tar archive, it will not
    unpack symlinks correctly.

Then (from the bash command line window) run 'make' ...

If you have problems with GNU make, get 'smake' from:

    ftp://ftp.berlios.de/pub/smake/alpha/

/*--------------------------------------------------------------------------*/
A bash window is available from the START -> Programs -> Cygnus Solutions
menu or by clicking at the Cygwin Logo on the desktop.
/*--------------------------------------------------------------------------*/
Pre-compiled current 'cdrtools' Win32 binaries which should run on
W95, W98 and WNT are available from:

    ftp://ftp.berlios.de/pub/cdrecord/alpha/win32

To use the pre-compiled binary, put the files cygwin1.dll, mount.exe as well
as the files:

cdrecord.exe		- The CD recording program
cdda2wav.exe		- The DAE (Digital Audio Extraction) program
mkisofs.exe		- The ISO-9660/Rock Ridge/Joliet Filesystem formatter
readcd.exe		- A simple program to extract CD-ROM raw data to a file

in your WINDOWS binary directory and from a Command/MS-DOS (or bash) window
type:
    cdrecord -help

for usage, see also:

http://www.fokus.fhg.de/research/cc/glone/employees/joerg.schilling/private/man/cdrecord.html

All programs in this directory are Unix command line utilities and know
nothing about DOS/WIN. They run in a POSIX subsystem that is supplied by
cygwin1.dll. Therefore all directory names are given in Unix (POSIX) format
(i.e. use '/' for a directory separator, not '\'). To access files on another
disks (i.e. floppy, CDROM and network disk), you need to use the supplied "mount"
command e.g.

    mount a: /a
    mount d: /cdrom

i.e. files on the floppy disk are accessed as being in directory /a and
files on the CDROM are accessed as /cdrom (assuming your CDROM is drive d:)

Yu may also use the new /cygpath notation by typing /cygpath/a for
your local floppy.

The notation //a/dir as a replacement for the DOS directory name a:\dir
may not work in future releases of Cygwin.

The following command creates a CD image in the current directory
using a source directories on the CDROM drive, a sub-directory and the
floppy drive:

    mkisofs -o hsfs.iso -J -R /cdrom/subdir dir1 /a

If you use the options noted above, the hsfs.iso image is ISO-9660
compliant and includes both Rock Ridge (IEEE P1282) and
Joliet (Microsoft proprietary) extensions.

If your CD writer is on target 6, type

    cdrecord dev=6,0 -v speed=4 hsfs.iso

to write the image at speed 4 in TAO mode, or

    cdrecord dev=6,0 -v speed=4 -dao hsfs.iso

to write the image in DAO mode.

If you don't like to create the image file 'hsfs.iso' you may use a PIPE
to connect mkisofs's output to cdrecord's input by calling:

    mkisofs -J -R /cdrom/subdir dir1 /a | cdrecord dev=6,0 -v speed=4 -

IMPORTANT NOTE:	If you use PIPE's on Win32, you definitely need a POSIX
        compliant shell to start the programs. Native Win32 PIPE's
        are not POSIX compliant and will not work with POSIX compliant
        programs.

/*--------------------------------------------------------------------------*/
If you don't know which target your CD-writer is, call

    cdrecord -scanbus

This gives output similar to:

Cdrecord-ProDVD sparc-sun-solaris2.4 release 1.8a39 Copyright (C) 1995-2000 Jцrg Schilling
Using libscg version 'schily-0.1'
scsibus0:
    0,0,0	  0) 'Quantum ' 'XP34300         ' 'F76D' Disk
    0,1,0	  1) 'SEAGATE ' 'ST11200N        ' '8334' Disk
    0,2,0	  2) *
    0,3,0	  3) 'TOSHIBA ' 'MK537FB/        ' '6258' Disk
    0,4,0	  4) 'WANGTEK ' '5150ES SCSI-36  ' 'ESB6' Removable Tape
    0,5,0	  5) 'EXABYTE ' 'EXB-8500-85QUE  ' '0428' Removable Tape
    0,6,0	  6) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
    0,7,0	  7) HOST ADAPTOR
scsibus1:
    1,0,0	100) 'IBM     ' 'DCAS-34330      ' 'S65A' Disk
    1,1,0	101) *
    1,2,0	102) *
    1,3,0	103) *
    1,4,0	104) 'PLEXTOR ' 'CD-R   PX-W8220T' '1.00' Removable CD-ROM
    1,5,0	105) 'YAMAHA  ' 'CRW4416S        ' '1.0f' Removable CD-ROM
    1,6,0	106) *
    1,7,0	107) HOST ADAPTOR

The numbers on the labels are SCSIbus# * 100 + target#

You then call cdrecord dev=bus#,target#,0

If you e.g. like to talk to the Yamaha drive from the list above, you need to
call:

    cdrecord dev=1,5,0 ......

/*--------------------------------------------------------------------------*/

            NOTE

If "cdrecord -scanbus" dumps core (dies from program fault), you have
a broken ASPI driver on your PC.

If you cannot see your drive(s), the following registry changes should make
them visible:

  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Aspi32]
  "ErrorControl"=dword:00000001
  "Start"=dword:00000001
  "Type"=dword:00000001

  [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Aspi32\Parameters]
  "ExcludeMiniports"=""

If you like to use the tools with SCSI or ATAPI, you need a working
ASPI32 driver and dll on your system. If you don't have it already,
look for 'aspi_me'. You need to set you clock back to a time before
Jan 1st 1999 to be able to install it. Note that 'aspi_me' contains
original Adaptec drivers and is banned from most ftp servers for this
reason.

You need a special ASPI driver version on NT-5.0 (Win2000)

************************************ Seems to be dead
You may get one by downloading

    http://www.poikosoft.com/writer/download.html

and unpacking the file mightywriter121.exe using unzip.
after you renamed ntaspi32.dll to wnaspi32.dll, cdrecord should work.
************************************ Seems to be dead

But here is a new source for ASPI drivers:

http://www.fortunecity.com/skyscraper/solo/719/aspi_drivers.htm

            IMPORTANT

In order to avoid damaging CD blanks because Win is trying to access
the drive while cdrecord writes to it, you definitely should edit
your registry and set the value of

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Cdrom\Autorun

to '0'.

The Registry entry noted above is valid for WNT, I don't know
if you need to do this for W95 or W98, nor do I know the
correct Registry entry for these systems.

/*--------------------------------------------------------------------------*/

        For binary only users:

Error messages and help output is directed to stderr. Win32 command
interpreters don't know about stderr. I recommend to install bash.exe
because it is a POSIX compliant shell and allow working PIPE's and
it also gives you a command line history that may be edited using
cursor commands.

Otherwise you may want to install the Cygwin light version which
only includes the user commands.


Ho to copy CD's and CD-R/CD-RW's

Copying audio CD's:

If you want to copy audio CD's, look for 'cdda2wav'. Be sure tu use use
at least a cdda2wav-0.95beta or later. Older releases will not read correctly
from SCSI-3/mmc compliant drives.

Copying data CD's:

The best way to copy a data disk is to copy the raw data on the master CD.
This may be done by reading the data from the raw device by using 'readcd'.

NOTE:	All CD-R's written in Track At Once mode end in two unreadable
    run-out sectors. If the disk has been written with a Yamaha CD-R100
    or with a Yamaha CD-R102, there are even more run-out sectors.

For this reason, you will not be able to read such a CD correctly with 'dd'.

I recommend to write all disks in Disk at Once mode if your drive
is supported in DAO mode with cdrecord. In addition, you may wish to
add padding (see cdrecord / mkisofs man pages).

If you want to copy such a CD directly with cdrecord, you may call:

    cdrecord -v dev=... -isosize /dev/rdsk/c0t6d0s0

But this may fail if the master gives read errors. To copy such a CD to a file
you may use the program 'readcd' from this package

Call 'readcd [target] [lun] [scsibusno]' and select function 11.
Or call readcd -help to get alternate usage.
To prevent readcd from reading the run-out sectors, reduce the
number of sectors to copy by 2.

Recent readcd versions may be called: readcd dev=b,t,l f=outfile
To reduce the numbers of sectors to copy you may use the sectors= option.

If the master disk is made of several partitions (like a Solaris boot CD),
the best way to copy a CD is to use the program 'readcd'. It ignores
the partition info and does raw SCSI reads.

If you like to copy audio CD's in a way that preserves as much accuracy as
possible, use:

cdda2wav -vall -D... -B
cdrecord -v dev=... -dao -useinfo *.wav

This will preserve pre-gap sizes, indices ...


Creating multi-session CD's Mini Howto FAQ

Multi-session filesystems are a trick that comes from the Kodak photo CD.
The OS mounts the last session that contains the sum of the current session
and all previous sessions.

To test (with Linux):

Create a iso-9660 filesystem image with mkisofs-1.10 or later.
mkisofs is included in the cdrecord release (including
SunOS/Solaris multi-session support)
Use the -R flag to add Rock Ridge extensions (this is important).

Assuming that the CD-R drive is connected to target 2 on the SCSI bus.

Write the first session with:

cdrecord -v speed=2 dev=2,0 -eject -multi isoimage.raw

Note that all Sony drives do no support XA2 disks in firmware - read README.sony
for more information.

This must be a iso9660 image with Rock Ridge extensions (see above)

Note the number of sectors written and check the disk, it should be mountable.

Next step is to check if cdrecord is able to retrieve the following data:

    1) The first block (sector) number in the first track of the last session
       This must be '0' in our case.

    2) The next writable address in the unwritten session following the current.
       This should be the number of sectors written in the first
       run + ~ 11400 sectors for about 22MB lead out/in

       For the first additional session this is 11250 sectors lead-out/lead-in
       overhead + 150 sectors for the pre-gap of the first track after the
       lead-in = 11400 sectos.

       For all further session this is 6750 sectors lead-out/lead-in
       overhead + 150 sectors for the pre-gap of the first track after the
       lead-in = 6900 sectors.

To get this information type:

cdrecord -msinfo dev=2,0

The output should be two numbers separated by a comma.

    e.g.: 0,204562

The first number is (1), the second number is (2).

Create the image for the next session with mkisofs-1.12 or later.
It is included in the cdrecord distribution.

2nd session:
You should create a directory that contains a second directory with data in it
for this purpose.

    e.g.:
        first_dir/
            second_dir/
                file_1
                file_2
                ...

call:

On Linux:
mkisofs -o isoimage_2.raw -R  -C xx,yy -M /dev/cdwriter_blk_dev  first_dir

On SunOS:
mkisofs -o isoimage_2.raw -R  -C xx,yy -M target,lun first_dir

Note that the name "first_dir" is not important.

If you still keep the old raw image of the first session and there is only
one previous session on the CD you may also call:

mkisofs -o isoimage_2.raw -R  -C xx,yy -M isoimage.raw first_dir

The argument of -C is the output of cdrecord -msinfo
-	On Linux, the argument of -M is a device that would allow you to mount
    the current CD in the CD-writer
-	On SunOS, target and lun refer to the SCSI target and lun of the
    CD-R device with the same notation as for cdrecord dev=xxx,yyy .

If you want to check, whether mkisofs make everything right, you should create
another image by using the following command line.

On Linux:
mkisofs -o isoimage_2.raw -R  -C xx,0 -M /dev/cdwriter_blk_dev  first_dir

On SunOS:
mkisofs -o isoimage_2.raw -R  -C xx,0 -M target,lun first_dir

Where xx is the first number of the pair returned by cdrecord -msinfo

You may check ***this** image by mounting it with my "fbk" on Solaris
or the loopback driver on Linux.

On Linux type:
    mount isoimage_2.raw -r -t iso9660 -o loop /mnt

On SunOS type:
    mount -r -F fbk -o type=hsfs /dev/fbk0:isoimage_3.raw /mnt

For Solaris 8 and later you may also use the Sun lofi driver (see README.sun-lofi)

If you list /mnt, you should see all directories that have been in the first
session and the directory "second_dir". If you try to read a file from the
first session, you will get an I/O error or bad data (depending on the
block address), don't worry about that. If you try to read a file from
the second session, you will see everything correctly.

To write the second session to CD, call:

cdrecord -v speed=2 dev=2,0 -eject -multi isoimage_2.raw

If you mount this CD, you should see the first session and the second directory
from 2nd session added to the root directory of the CD.

Additional check:

call:

cdrecord -msinfo dev=2,0

The first number should be the first writable address which was retrieved by the
first call to cdrecord -msinfo after creating the first session.
The second number should be the first number + number of sectors of the second session
+ ~ 11400 sectors.

Note: The first lead-out is 1:30 (6750 sectors) the lead-in is 1:00 (4500 sectors)
All following sessions need only 0:30 for lead-out (2250 sectors), the lead-in
is also 1:00. So in theory, the can be 44 sessions on s 74 minute disk if you
take into account that the minimum track size is 4 seconds.

The total amount of the overhead is 11250 + 150 sectors for the first additional
session and 6750 + 150 sectors for all subsequent sessions.
The 150 additional sectors are the pre-gap sectors for the first track after
the current session.

Some notes on multi-session CD's that contain only Joliet but no Rock Ridge:

Joliet is a really bad idea in general:

-	There is no way to find a relation between a ISO-9660 name and a Joliet
    name. If the file has a size, you may try to match the starting sector #
    but if the size in 0 it's impossible.

-	Joliet does not allow long filenames (it limits names to 64 chars).

-	Joliet does not allow all (usually used) characters in filenames.

    All code points between (00)(00) and (00)(1F), inclusive. (Control Characters)
        (00)(2A) '*'(Asterisk)
        (00)(2F) '/' (Forward Slash)
        (00)(3A) ':' (Colon)
        (00)(3B) ';' (Semicolon)
        (00)(3F) '?' (Question Mark)
        (00)(5C) '\' (Backslash)

    While '/' is not a real problem ;-) other characters may cause troube.

All notes above prevent you from doing reliable multi-session if the CD does
only contain Joliet but des not contain Rock Ridge attributes.

In addition, please read README.joliet in the mkisofs directory.

This is the answer to a commonly asked question is why can't I continue a
multisession CD that has been started on a Microsoft system using mkisofs.

Note: It is not possible to create a multi-session HFS CD. If you create
a multi-session CD using any of the HFS options, then each new HFS
session will ignore HFS files from any previous sessions. A warning will
be printed if you attempt this. However, if you use the '-part' option to
mkisofs for each session you create, then each session will appear as
separate volumes when mounted on a Mac. In this case, it is worth using the
'-V' or '-hfs-volid' option to give each session a unique volume name,
otherwise each "volume" will appear on the Desktop with the same name.

Joerg Schilling


Cdrecord allows you to create multi-session CD's with all
supported drives. Cdrecord comes with a hacked mkisofs
that allows you to that on even on systems that don't support
a sectorsize 2048 Bytes (e.g. SGI IRIX and old versions of Solaris)
or systems that don't support raw device access (e.g. OS/2 W95/W98/WNT).
This is possible because this hacked version of mkisofs
uses my scg driver to read the old session from the CD-Recorder.

According to www.cd-info.com, a CD+ is a CD with two sessions.
The first session is an audio session, the second session a data
session.

Creating a CD+ is first writing an audio session in
multi session mode and then writing a data session.

If you like to append a filesystem to a audio CD, first extract the
CD by calling:

    cdda2wav -B -vall

This first audio session may be written in TAO mode with the command

    cdrecord -multi -audio file1 ....

or in DAO mode with the command

    cdrecord -dao -multi -useinfo -audio file1 ....

To add the second session that contains the data track, you need
to create an ISO-9660 file system that starts not at sector 0.

With the current mkisofs (1.12), you must use the following method:

-	First call cdrecord -msinfo for your prepared multi-session audio CD.

    you will get something like 0,12345

-	Now call mkisofs:

    mkisofs -o fs.raw -C 0,12345 root_directory_for_new_cd

    replace 0,12345 with your actual cdrecord -msinfo output.

the image in fs.raw may now be written with cdrecord as second session.

See my README.multi for more info on how to create multi session CD's

The procedure again in short form:

    cdda2wav -vall -B

    cdrecord -multi -audio audio_tracks ....
or
    cdrecord -dao -useinfo -multi -audio audio_tracks ....

    cdrecord -msinfo ....
    (output is e.g. 0,12345)

    mkisofs -R -o cd_plus.raw -C 0,12345 root_dir_of_fs

    cdrecord -data cd_plus.raw
or
    cdrecord -multi cd_plus.raw

Note: If you want to create an HFS hybrid as the data track, then you must
use the '-part' option to mkisofs. Otherwise, the data track will be mounted
as an ISO9660/Joliet CD when used on a Mac.

Jörg


People (with a Linux only background) often ask me why do you depend on
"ATAPI-SCSI emulation", why don't you support generic IDE?

    Well first a statement: There is no single IDE burner out!
    Even a CD-ROM cannot be used decently if you use only IDE commands.
    Opening/closing the door, playing audio and similar things
    cannot be done using vanilla IDE commands - you will need SCSI commands
    to do this. But how do we do this with a drive that uses an IDE
    interface?

    The ATAPI standard describes method of sending SCSI commands over IDE
    transport with some small limitations to the "real" SCSI standard.
    SCSI commands are send via IDE transport using the 'ATA packet'
    command. There is no SCSI emulation - ATAPI drives include native
    SCSI command support. For this reason, sending SCSI commands to ATAPI
    drives is the native method of supporting ATAPI devices. Just imagine
    that IDE is one of many SCSI low level transport mechanisms.

    This is a list of some known SCSI transports:

    -	Good old Parallel SCSI 50/68 pin (what most people call SCSI)
    -	SCSI over fiber optics (e.g. FACL - there are others too)
    -	SCSI over a copper variant of FCAL (used in modern servers)
    -	SCSI over IEEE 1394 (Fire Wire)
    -	SCSI over USB
    -	SCSI over IDE (ATAPI)

    As you now see, the use of the naming convention "ATAPI-SCSI emulation"
    is a little bit misleading. It should rather be called:
        "IDE-SCSI host adapter emulation"

Some naming explanations:

    ATA	Attachment Adapter
    IDE	Integrated Drive Electronics (A Drive that includes ATA)
    ATAPI	ATA Packet Interface

When cdrecord has problems with ATAPI drives on Linux this usually is a Linux
kernel problem. The Linux kernel maintainers unfortunately refuse to correct
their current IDE driver system setup which does not support ATAPI by default.
ATAPI _is_ SCSI over IDE transport. It is hard to understand why Linux still
uses a default driver setup that is designed for IDE CD-ROM drives made
before 1994 (using a IDE compat mode that only allows to use the drive
read-only) and does not handle to send SCSI commands to ATAPI drives by
default. This makes it hard for people who just started with Linux to do
CD-writing on Linux if they own an ATAPI drive.

/*--------------------------------------------------------------------------*/
Which Operating systems support ATAPI

-	AIX: Status unknown! Please report your experience...

-	Apple Mac OS X (Darwin): Supported

-	BeOS (libscg maps ATAPI to SCSI bus # >= 8

-	BSD/OS: Status unknown! Please report your experience...

-	FreeBSD:
        -	YES for the latest default kernel.
            It includes finally ATAPI-Cam

        -	NO for the older kernels.
            Yes, if you install a kernel patch from
            Thomas Quinot <thomas@cuivre.fr.eu.org>
            See http://www.cuivre.fr.eu.org/~thomas/atapicam/
            and README.FreeBSD

-	HP-UX: It looks like ATAPI does not work correctly due to kernel bugs.

    New information:
    HP supports a HP A7853A B/C class machine (s700_800) with HP-UX-11.x
    You need to install a patch:

    Patch Name: PHKL_27224 Patch Description: s700_800 11.00 IDE/ATAPI
    cumulative patch

-	Linux (unfortunately not in the default configuration)

    -	It works more or less if you include ide-scsi

    -	Linux-2.4.xx includes a CDROM Packet interface in the
        IDE CD driver. For this driver libscg now includes
        support in pre-alpha status. Use cdrecord dev=ATAPI -scanbus
        to check for drives and e.g. cdrecord dev=ATAPI:0,0 ....
        for writing. Note that this interface is not integrated into
        the standard libscg device naming scheme. Support for
        this interface has been included because it is the only
        way to use a PCCARD/PCMCIA writer - trying to use ide-scsi
        on a PCATA interface will cause a Linux kernel panic
        or will block all ATAPI drives.

    -	Starting with Linux-2.5.45, there is a new experimental
        ATAPI interface initiated by Linus Torvalds. Unfortunately,
        this interface does not fit well into the rest of the Linux
        SCSI kernel transport naming scheme. Cdrecord allows to
        use this interface by calling e.g. cdrecord dev=/dev/hdc ...
        but it is not officially supported until it has been
        integrated into the dev=bus,target,lun nming scheme.

    All Linux ATAPI transport implementations do not support DMA.
    Current execptions are:

    -	ide-scsi with block size 2048 and if DMA has been enabled

    -	The new experimental ATAPI interface starting with Linux-2.5.45
        allows DMA if DMA has been enabled and the sector size is a
        multiple of 4. This allows to use DMA for audio CDs and
        when writing any type of CD in RAW mode.

    RAW mode is needed for many new and cheap drives that have bugs when
    writing in cooked mode. If there is no DMA, you cannot write faster
    than approx 16x.

-	NetBSD (releases 1.3 and newer)

-	NeXT: Status unknown! Please report your experience...

-	OpenBSD: (release 2.6 and newer)

-	OS/2 (you need to fetch and install ATAPI support first)
    see: http://www.leo.org/pub/comp/os/os2/leo/drivers/dasd/daniatapi.zip/

-	OSF-1 / True64 Status unknown! Please report your experience...

-	SCO-OpenServer: Not supported, may change with next release.

-	SCO-UnixWare: NO

-	SGI/IRIX: Status unknown! Please report your experience...

-	Solaris (you may need to use the USCSI transport interface to address
    ATAPI if the IDE hostadapter idriver implementation does not follow
    Sun's internal standards).

    ATAPI works fine on Solaris 7 sparc and on Solaris 7/8 intel.

    On Solaris 8 (intel) and newer, the ATAPI/SCSI subsystem is integrated
    correctly according to Sun's SCSA white paper, so the 'scg' driver works.
    This is not true for Solaris on sparc where the ATAPI driver do not conform
    to Sun's internal structuring rules. You need to use the USCSI interface
    on for ATAPI drives on Solaris sparc for this reason.

    Solaris 8 sparc has a ATA DMA bug that prevents cdrecord from working at all.
    There is a fix from Sun available: the patch 108974-16
    Solaris 9 sparc works again, it has the fix for the ATA DMA bug included.

-	VMS: works on recent versions!

-	Win32 using a recent ASPI Layer supports ATAPI
    You nay need to exclude mini port drivers (see README.win32).

/*--------------------------------------------------------------------------*/
General hints:

***********************
NOTE: IDE/ATAPI doesn't have disconnect/reconnect! you cannot expect the needed
    performance for CD-writing if you connect source and destination drive
    to the same IDE cable.
***********************

If you never like to directly write a CD from CD-ROM source, this configuration
seems to be the best:

IDE 0	MSTR	->	HD1
IDE 0	SLAV	->	HD2

IDE 1	MSTR	->	CD-writer
IDE 1	SLAV	->	CD-ROM

If you like to write from both HD source and CD-ROM source, you should have
the following configuration:

IDE 0	MSTR	->	HD1	(does _not_ hold CD mastering data)
IDE 0	SLAV	->	CD-Writer

IDE 1	MSTR	->	HD2	(holds CD mastering data)
IDE 1	SLAV	->	CD-ROM

If cou cannot set up a decent cabling (e.g. because you use a notebook)
you may try to use cdrecord -immed ...
It runs slow commands in quick (immediate) return background mode and
tries to wait between the write commands to allow to free the IDE cable
so the cdrecord read process may fill the FIFO from the other drive
on the same IDE cable.

/*--------------------------------------------------------------------------*/
The rest of this file is only valid for Linux!

This was taken out of mails from From: Dave Cohen <dcohen@richmond.infi.net>
and From: Gadi Oxman <gadio@netvision.net.il>
(slightly modified marked ***JS *** except typo corrects)

As all actual Linux versions have ATAPI support for cdrecord,
I removed the patch section. If you are running a Linux version
that does not support ATAPI<->SCSI command transport, please upgrade.

The basic driver design in Solaris would also allow to use ATAPI
drives but unfortunately, Sun made a mistake in the mid-level design.
If you want to use ATAPI drives with Solaris, ask Sun why they don't
support SCSI passthrough to IDE although they are using a common driver
concept.

Please use cdrecord-1.6 final or later (if available), it includes the
modifications needed for ATAPI drives and is still working with other
SCSI drives. Older revisions of cdrecord do not support ATAPI drives.

If you are using Linux Kernel version prior to 2.1.73 or prior to
2.0.35, please upgrade before you try to compile and use cdrecord.

In any case, you need to configure a kernel with ATAPI/SCSI hostadapter
emulation. Read carefully the following instructions:

In any case, you need to disable generic IDE/ATAPI CDROM support in
order to make ATAPI SCSI emulation working.

Many people ask why I use ATAPI-SCSI emulation.

    The use of the naming convention "ATAPI-SCSI emulation" is a
    little bit misleading. It should rather be called:
        "SCSI host adapter emulation"

    The ATAPI standard describes method of sending SCSI commands over IDE
    with some small limitations to the "real" SCSI standard.
    For this reason ATAPI-SCSI emulation is the native method of
    supporting ATAPI devices.

If you have problems to talk to the device when it is jumpered as "slave"
try to use it  as "master". If you connect a hard disk to the same IDE
cable as the CD writer or if you try to read/write data from another drive
that is connected to the same IDE cable as the CD writer you may get
problems too.

NOTICE:

With the newer 2.1.x or 2.2.x kernels it seems to be possible to run
SCSI/ATAPI hostadapter emulation and generic IDE at the same time by
selectively telling the kernel what to use for which drive.  However,
this would not be needed if the Linux SCSI CD-ROM driver would be more
up to date and supports standard conforming drives.

Jцrg Schilling <schilling@fokus.fhg.de>

--------------------------------------------------
Here is a hint from Alan Brown <alanb@manawatu.gen.nz>:

To allow ATAPI cd and ide-scsi support on the same machine, add
`hd<x>=ide-scsi` to the lilo.conf append entry, or use
`hd<x>=ide-scsi` at the bootup lilo prompt.

I have my HP-7200 RW drive as the primary drive on the second IDE
bus, so the statement used is "hdc=ide-scsi"

--------------------------------------------------

Hope that the following  is helpful to you.

I recently purchased a HP-7110i CD-RW, which is the U.S. only version of
what you have. The HP 7100 and 7110  CD rewritables use the ATAPI
standard. Originally, the drives were not supported under Linux (due to
some inconsistencies with SCSI translations between the kernel and the
CD), but that problem has just recently been fixed. There are some kernel
and cdrecord patches that have been made to support this device that have
yet to be officially incorporated into cdwrite and the kernel. In order to
get your drive supported under Linux, you will have to do the following:

1. Get the proper version of cdrecord.

As of this writing, I am just getting ready to test Joerg's new cdrecord.
I am currently operational on cdrecord-1.5, so I know that works, and I
have attached patches for that version.

If you are in a hurry, you can download ver. 1.5, apply patches, and
rock-n-roll. You may want to wait, though.  Up to you ;). The version with
ATAPI support is cdrecord-1.6alpha5. I'm not sure if the current kernel
patches are valid for this version, but i'll know soon enough.
**** They are valid **** JS

BTW, the new version of xcdroast now supports cdrecord - this version
is in beta testing, too (currently uses cdrecord-1.5 but cdrecord-1.6a5
should work with the actual xcdroast too).

2. Upgrade to kernel version 2.0.31

IDE/SCSI translation was first added in this kernel. Because your CD-RW is
an ATAPI device, it will support SCSI command sets.  The translation
allows you to map the device as a SCSI generic device. This will allow
cdrecord to recognize it as a SCSI device.
**** 2.0.31 still needs patches, get 2.0.35 or later **** JS

3. Get the patches and apply them

Attached find kernel patches for kernel sources ide.h and ide-scsi.c, and
cdrecord source scsi_cdr.c (version 1.5 only).
**** Get cdrecord-1.6 or later **** JS

3. Recompile kernel with SCSI emulation support

If you do a "make menuconfig" or "make xconfig", select SCSI emulation
under the category "Floppy, IDE, and other block devices".

WARNING:
Do not install SCSI support as a module - there is a bug in the makefile
structure that will cause the compile to fail.  Compile directly into the
kernel.

4. WARNING: Disable generic IDE/ATAPI CDROM support	*** JS ***

If you don't do this, the SCSI emulation will not work  *** JS ***

5. This is important too:
You also need to enable SCSI and SCSI generic support   *** JS ***

6. Make sure that /dev/sg* exists.
If they are missing, create them.

Dave Cohen
dcohen@richmond.infi.net
(Patch instructions below)

-----------------------------------------------------------------
From: Danilo Fiorenzano <shade@juliet.gppsd.ab.ca>

Anyway, here's what I did, using kernel version 2.0.33  I believe this
is the proper way to get an HP-7100i to work (and as far as I can tell,
any other IDE CD-writer unit):

1) patch the kernel as described by README.ATAPI

2) save your current kernel config to an alternate file, then run
   "make mrproper"

3) run 'make menuconfig' or 'make xconfig', then choose "load config
   from alternate file" to restore the original configuration

4) In "Floppy, IDE and other block devices", disable "IDE/ATAPI CD-ROM
   support" and enable instead "scsi emulation"

5) in "SCSI support" enable "SCSI support", "SCSI CD-ROM support" and
   "SCSI generic support", everything directly in the kernel.

6) compile, install kernel/modules, reboot.  Now, if everything went
   fine, your CDROM units should show up with a message like:
 "hdb: HP CD-Writer+ 7100, ATAPI CDROM drive - enabling SCSI emulation"

7) run "cdrecord -scanbus" to make sure cdrecord can see the unit and
   talk to it.  The end.

Don't forget that now -all- of your CD drives are seen as -SCSI- units
by all programs (/dev/scd0 etc.), so you might want to relink
/dev/cdrom to the proper scd<n> in order to get xcdplay or whatever to
work again.

-------------------------------------------------------------------------------
NOTE:

1)	Actual cdrecord releases support ATAPI

2)	Linux 2.0.35 or Linux 2.1.73 or later include ATAPI support
-------------------------------------------------------------------------------
From whampton@staffnet.com Fri Jan 14 05:21:34 2000
From: "W. Wade, Hampton IV" <whampton@staffnet.com>

You may wish to include/append these notes to your ATAPI notes....

I have my 4X Acer CD-R/RW ATAPI drive working with Linux.   My platform
is
RedHat 6.1 with kernel 2.2.14.  My first ATAPI CD device is a DVD with
the second
the CD-R.  I made the following changes:

Steps:

1.  Identify which device is the CD-R -- in my case the fourth ATAPI
device, /dev/hdd.

2.  Compile the kernel to include ATAPI CDROM and SCSI emulation:

     Under the block devices menu:
                Y or M     Include IDE/ATAPI CDROM support
                Y or M     SCSI emulation

3.  Build and install the upgraded kernel.

4.  If you selected modules, add them to the /etc/conf.modules file.

5.  In the /etc/lilo.conf file add an append line for ide-scsi, in my
case:
        append = "hdc=ide-scsi hdd=ide-scsi"

6.  Reboot to the new kernel and make sure the ide-scsi module is loaded

        /sbin/lsmod | grep ide-scsi

7.  Make a link from the proper SCSI device to a symbolic, e.g.,
/dev/cdrom:
      In my case the DVD is the first CD, hence appears as /dev/scd0 to
scd7
      (cat /proc/scsi/scsi to get a full list of devices -- the first
CD-ROM will
      appear as scd0, etc.)  With the current ATAPI-SCSI module, each CD

      device appears as 8 SCSI devices (different logical units).  If
you have
      two devices, like I do, you may have to make a node for the second
device.
      In my case I had to make scd8:

            cd /dev
            mknod scd8 b 11 8

        Then make links, in my case:

            ln -s scd0 cdrom
            ln -s scd8 cdr

        Note, many CD-ROM player programs expect the audio CD drive to
        be located at /dev/cdrom (xplaycd, etc.), hence this link is
recommended.

        If you try to use /dev/hdc (or wherever your CD or CD-R is)
after loading
        the ide-scsi module, you may not be able to mount CD's or play
audio
        discs -- you have to use the new SCSI names for the device.

8.  Fix your /etc/fstab file to mount the /dev/cdrom and /dev/cdr

/*--------------------------------------------------------------------------*/
From: Eduard Bloch <edi@gmx.de>

Situation:
   Linux: Kernel 2.2.15 (Debian package kernel-image-2.2.15)
   Distribution: Debian Potato (deep freeze), i386
   Devices: one CDRW-Writer, one CDROM-drive, both ATAPI

1. Become root, try "grep hd.: /var/log/kern.log" to find out where your
   ATAPI-devices are connected to (hd?-names).
2. Edit your boot configuration file, eg. /etc/lilo.conf if you use
   lilo or the batch-file if you boot via loadlin.
3. Find a line where you can append additional kernel parameters, eg.
   "append=" in lilo.conf or the loadlin-line in the batch file.
4. Append sth. like this: "hdb=ide-scsi hdc=ide-scsi max_scsi_luns=1"
   The hdX-parameters defines devices that should be mapped to SCSI
   latter. You may do it with non-writers too, since the emulation layer
   is almost complete, or let them out so the devices will use their
   native drivers.
5. Save the file, reinstall the bootloader (ie. running "/sbin/lilo")
6. Call "modconf", load "sg" and "ide-scsi" from the SCSI-section
7. Reboot Debian, watch while booting, you should see a line like this
   "Detected scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0".
   Your old ATAPI devices virtually don't exist any longer, use the
   SCSI equivalents instead.
8. Become root, setup devices:
      cd /dev
      MAKEDEV sg scd
      ln -s scd0 cdrom # NOTE: or cdrw, first check which drive is here
      ln -s scd1 cdrw  # NOTE: see above, maybe cdrom
   Check the new SCSI settings:
      cdrecord -scanbus
   Setup cdrecord's environment - edit /etc/default/cdrecord:
      CDR_DEVICE=cdrw
      cdrw=1,0,0        4       8m
      cdrom=1,2,0       0       0m
   Input the right values, the fields are described in the manpage
   of cdrecord. Alternatively, you may use this values as
   cdrecord-parameter or take a frontend with an own configuration
   scheme, then you don't need to modify /etc/default/cdrecord.
9. It's done! Insert a CD and try "cdrecord -v -toc"
/*--------------------------------------------------------------------------*/
He had constant buffer underrun problems:

From: "Trenton D. Adams" <trenton.adams@telusplanet.net>

I enabled DMA, and 32-bit mode on the CD-Writer using "hdparm".
This fixed the writing problem.

/*--------------------------------------------------------------------------*/
From: "Mario Moder" <clay-man@freenet.de>
-----
TEAC CD-W54E

I recently installed a TEAC CD-W54E (an ATAPI CD-RW-Recorder) and I had
problems with buffer underruns and other errors when burning a CD (with
Linux and Windows 2000). My system has an old ASUS P/I-P55T2P4 Pentium
mainboard with Intel PCI-Bus-Master-IDE (I think the chipset is an Intel
430HX and the IDE controller is an 82371SB). The harddisk is the master on
the primary IDE channel, and the CD-Recorder is the master on the secondary
IDE channel.

After turning off DMA for the CD-Recorder AND the harddisk, the drive had no
longer problems with burning a CD. You can try the following things to make
it work, if you have similar problems with a similar hardware configuration:

For Linux (Kernel 2.2.19):
Turn off "Enable DMA by default" in the kernel (and then compile a new
kernel), if you had it turned on or use "hdparm" to turn of DMA for both the
CD-Recorder and the harddisk

For Windows 2000:
In the Device Manager go to "IDE ATA/ATAPI-Controller" and open the
properties for the first and second IDE channel. There you change the mode
of the devices from DMA to PIO.
-----

/*--------------------------------------------------------------------------*/

Hints for the Linux Packet code in ide-cdrom.c:

    WARNING! It seems that this driver does not allow to send all
    SCSI commands. A command that definitely fails is READ FULL TOC.
    For this reason, you cannot read those 'defective' audio CDs
    with broken TOC when you use this interface.

    Thanks to Alexander Kern <alex.kern@gmx.de> for the idea and first
    code fragments for supporting the CDROM_SEND_PACKET ioctl() from
    the cdrom.c kernel driver. Please note that this interface in principle
    is completely unneeded but the Linux kernel is just a cluster of
    code and does not support planned orthogonal interface systems.
    For this reason we need CDROM_SEND_PACKET in order to work around a
    bug in the linux kernel that prevents to use PCATA drives because
    the kernel panics if you try to put ide-scsi on top of the PCATA
    driver.

    The code is currently in "status nascendi" but usable with some trade offs.

    To use: call e.g.

        cdrecord -scanbus dev=ATAPI:

        cdrecord -dao -v speed=24 dev=ATAPI:0,0 ....

    Be careful! This code is only needed in order to be able to use
    PCATA CD-writers on notebooks because there is a severe kernel bug.
    Unfortunately, this bug causes the kernel to hang (and force you
    to reboot) if you try to call:

        cdrecord -scanbus

    without the dev=ATAPI: option.

    In this case cdrecord will hang infintely and unkillable
    in open("/dev/sg1", 2) => you need to reboot :-(

    Repeat by: Insert a PCATA CD-Writer in a Sony VAIO notebook and run
            cdrecord -scanbus.


How to copy a CD using the clone method

Hints for how to copy a CD using the clone method:

Step 1 (read master CD):

Call "readcd dev=b,t,l -clone f=somefile" and the files

somefile
and
somefile.toc

will be generated.

If the disk contains many sectors that are unreadable by intention,
call "readcd dev=b,t,l -clone -nocorr f=somefile"

Step 2 (write copy):

Call "cdrecord dev=b,t,l -raw96r -clone -v somefile"

If cdrecord complains that your drive does not support -raw96r, but the
drive is able to do clone writing at all, then cdrecord will promise you
a different write mode that works with the drive.